Pass username to get_policy helps a lot.
This commit is contained in:
parent
43e9cede0c
commit
7aaf82e266
@ -401,8 +401,11 @@ sub build_password_policy {
|
||||
# Anonymous user can have no policy
|
||||
return '' if($self -> {"session"} -> anonymous_session());
|
||||
|
||||
my $user = $self -> {"session"} -> get_user_byid()
|
||||
or return '';
|
||||
|
||||
# Fetch the policy, and give up if there isn't one.
|
||||
my $policy = $self -> {"session"} -> {"auth"} -> get_policy()
|
||||
my $policy = $self -> {"session"} -> {"auth"} -> get_policy($user -> {"username"})
|
||||
or return '';
|
||||
|
||||
my $policystr = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user