Example #1
0
 /**
  * Checks if the user has an 'admin' role
  *
  * @return bool
  */
 public function isAdmin($h, $username)
 {
     if (!$username || $username == $h->currentUser->name) {
         if ($h->currentUser->role == 'admin') {
             return true;
         }
         // what about can_access_admin ?
         return false;
     }
     //$isAdmin = \Hotaru\Models\User::isAdmin($username);
     $isAdmin = \Hotaru\Models2\User::isAdmin($h, $username);
     return $isAdmin;
 }
Example #2
0
 public function getCount($h, $role = '')
 {
     //$num = \HotaruModels\User::getCount($role);
     $num = \Hotaru\Models2\User::getCount($h, $role);
     if (!$num) {
         $num = "0";
     }
     return $num;
 }
Example #3
0
 private static function isUserLockedOut($h, $username = '')
 {
     if (!$username) {
         return false;
     }
     $status = \Hotaru\Models2\User::isLockedOut($h, $username);
     return $status;
 }