Added isVisitor, isAdmin, and isRegistered methods to User object instead
of hard coding checks everywhere with group ids. And updated the code base to match.
This commit is contained in:
parent
586164d8d0
commit
ef120fb06b
52 changed files with 201 additions and 118 deletions
|
|
@ -34,7 +34,7 @@ sub getInstance {
|
|||
my $session = shift;
|
||||
#Get Auth Settings
|
||||
my $authMethod = $session->user->authMethod || $session->setting->get("authMethod");
|
||||
$authMethod = $session->setting->get("authMethod") if($session->user->userId eq '1');
|
||||
$authMethod = $session->setting->get("authMethod") if($session->user->isVisitor);
|
||||
$authMethod = $_[0] if($_[0] && isIn($_[0], @{$session->config->get("authMethods")}));
|
||||
my $userId = $_[1];
|
||||
#Create Auth Object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue