/** * 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; }
public function getCount($h, $role = '') { //$num = \HotaruModels\User::getCount($role); $num = \Hotaru\Models2\User::getCount($h, $role); if (!$num) { $num = "0"; } return $num; }
private static function isUserLockedOut($h, $username = '') { if (!$username) { return false; } $status = \Hotaru\Models2\User::isLockedOut($h, $username); return $status; }