You are here

public function User::isEmpty in Rocket.Chat 8.2

1 call to User::isEmpty()
User::getUserProxy in modules/rocket_chat_api/src/RocketChat/Element/User.php
Retrieve the Proxy, create the User if needed.

File

modules/rocket_chat_api/src/RocketChat/Element/User.php, line 189

Class

User

Namespace

Drupal\rocket_chat_api\RocketChat\Element

Code

public function isEmpty() {
  $empty = TRUE;
  $email = FALSE;
  $username = FALSE;
  $name = FALSE;
  if (!empty($this->email)) {
    $email = TRUE;
  }
  if (!empty($this->username)) {
    $username = TRUE;
  }
  if (!empty($this->name)) {
    $name = TRUE;
  }
  if ($email && $username && $name) {
    $empty = FALSE;
  }
  return $empty;
}