Pass username to get_policy helps a lot.

This commit is contained in:
Chris 2013-02-13 17:43:31 +00:00
parent 43e9cede0c
commit 7aaf82e266

View File

@ -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 = "";