Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #115 from apility/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
thomas-alrek authored Dec 3, 2019
2 parents 82828de + 4898ebf commit e514edf
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/functions/live/functions_auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function check_login($username, $password, $groups = '99999', $field = 'mail')
*
* @param string $username = null
* @param string $groups = null
* @return int
* @return boolean
*/
function check_access($username = null, $groups = null)
{
Expand All @@ -63,18 +63,14 @@ function check_access($username = null, $groups = null)
);

if (isset($customer['id']) && $groups == '99999') {
return 1;
return true;
}

if (isset($customer['id']) && in_array($groups, $customer['groups'])) {
return 1;
}

if (isset($customer['id'])) {
return 2;
return true;
}
} catch (Exception $e) {}

return 0;
return false;
}
}

0 comments on commit e514edf

Please sign in to comment.