Changeset View
Changeset View
Standalone View
Standalone View
src/app/User.php
Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | class User extends Authenticatable implements JWTSubject | ||||
/** | /** | ||||
* Returns whether this domain is active. | * Returns whether this domain is active. | ||||
* | * | ||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
public function isActive(): bool | public function isActive(): bool | ||||
{ | { | ||||
return ($this->status & self::STATUS_ACTIVE) == true; | return ($this->status & self::STATUS_ACTIVE) > 0; | ||||
} | } | ||||
/** | /** | ||||
* Returns whether this domain is deleted. | * Returns whether this domain is deleted. | ||||
* | * | ||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
public function isDeleted(): bool | public function isDeleted(): bool | ||||
{ | { | ||||
return ($this->status & self::STATUS_DELETED) == true; | return ($this->status & self::STATUS_DELETED) > 0; | ||||
} | } | ||||
/** | /** | ||||
* Returns whether this (external) domain has been verified | * Returns whether this (external) domain has been verified | ||||
* to exist in DNS. | * to exist in DNS. | ||||
* | * | ||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
public function isImapReady(): bool | public function isImapReady(): bool | ||||
{ | { | ||||
return ($this->status & self::STATUS_IMAP_READY) == true; | return ($this->status & self::STATUS_IMAP_READY) > 0; | ||||
} | } | ||||
/** | /** | ||||
* Returns whether this user is registered in LDAP. | * Returns whether this user is registered in LDAP. | ||||
* | * | ||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
public function isLdapReady(): bool | public function isLdapReady(): bool | ||||
{ | { | ||||
return ($this->status & self::STATUS_LDAP_READY) == true; | return ($this->status & self::STATUS_LDAP_READY) > 0; | ||||
} | } | ||||
/** | /** | ||||
* Returns whether this user is new. | * Returns whether this user is new. | ||||
* | * | ||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
public function isNew(): bool | public function isNew(): bool | ||||
{ | { | ||||
return ($this->status & self::STATUS_NEW) == true; | return ($this->status & self::STATUS_NEW) > 0; | ||||
} | } | ||||
/** | /** | ||||
* Returns whether this domain is suspended. | * Returns whether this domain is suspended. | ||||
* | * | ||||
* @return bool | * @return bool | ||||
*/ | */ | ||||
public function isSuspended(): bool | public function isSuspended(): bool | ||||
{ | { | ||||
return ($this->status & self::STATUS_SUSPENDED) == true; | return ($this->status & self::STATUS_SUSPENDED) > 0; | ||||
} | } | ||||
/** | /** | ||||
* Any (additional) properties of this user. | * Any (additional) properties of this user. | ||||
* | * | ||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany | * @return \Illuminate\Database\Eloquent\Relations\HasMany | ||||
*/ | */ | ||||
public function settings() | public function settings() | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |