/** * Validate a users currect credentials and return correctly * based on there current status. */ public static function validateCredentials($permissionLevel) { if (!self::isLoggedIn()) { $user = new User(); $user->validate(); } if (self::isLoggedIn()) { return self::validatePermissions($permissionLevel, $_SESSION[SESSION_NAME]["CLASS"]); } return false; }