Example #1
0
 /**
  * Check if this user is pending activation
  * @since Version 3.9.1
  * @return boolean
  */
 public function getUserAccountStatus()
 {
     if ((bool) $this->active === true) {
         return self::STATUS_ACTIVE;
     }
     $BanControl = new BanControl();
     $BanControl->loadUsers(true);
     if (!empty($BanControl->lookupUser($this->id))) {
         return self::STATUS_BANNED;
     }
     if ((bool) $this->active === false) {
         return self::STATUS_UNACTIVATED;
     }
     throw new Exception("Cannot determine the status of this user account");
 }