diff options
author | Byron Jones <bjones@mozilla.com> | 2013-11-01 08:39:59 +0100 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-11-01 08:39:59 +0100 |
commit | e5d385374cb02e7d6b1b2013144135264ec5d29a (patch) | |
tree | 49e83687a3a08a749ac79ea41ea91bbc8acf2b50 /extensions/UserProfile/Extension.pm | |
parent | 682a16ef7a6bcd78cac1748f431ab3912269a929 (diff) | |
download | bugzilla-e5d385374cb02e7d6b1b2013144135264ec5d29a.tar.gz bugzilla-e5d385374cb02e7d6b1b2013144135264ec5d29a.tar.xz |
Bug 911812: make the user profile more discoverable
Diffstat (limited to 'extensions/UserProfile/Extension.pm')
-rw-r--r-- | extensions/UserProfile/Extension.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/extensions/UserProfile/Extension.pm b/extensions/UserProfile/Extension.pm index 99f235896..9e8eadb97 100644 --- a/extensions/UserProfile/Extension.pm +++ b/extensions/UserProfile/Extension.pm @@ -281,16 +281,18 @@ sub page_before_template { my $target; my $input = Bugzilla->input_params; my $limit = Bugzilla->params->{'maxusermatches'} + 1; - if (!$input->{login}) { + my $login = $input->{login}; + if (!$login) { $target = Bugzilla->login(LOGIN_REQUIRED); + $login = $target->login; } else { - my $users = Bugzilla::User::match($input->{login}, $limit, 1); + my $users = Bugzilla::User::match($login, $limit, 1); if (scalar(@$users) == 1) { # always allow singular matches without confirmation $target = $users->[0]; } else { Bugzilla::User::match_field({ 'login' => {'type' => 'single'} }); - $target = Bugzilla::User->check($input->{login}); + $target = Bugzilla::User->check($login); } } @@ -353,6 +355,7 @@ sub page_before_template { $vars->{stats} = $stats; $vars->{statuses} = $statuses; $vars->{products} = $products; + $vars->{login} = $login; $vars->{target} = $target; } |