diff options
Diffstat (limited to 'userprefs.cgi')
-rwxr-xr-x | userprefs.cgi | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/userprefs.cgi b/userprefs.cgi index 3288efe65..a07cff135 100755 --- a/userprefs.cgi +++ b/userprefs.cgi @@ -50,7 +50,7 @@ sub DoAccount { ($vars->{'realname'}) = $dbh->selectrow_array( "SELECT realname FROM profiles WHERE userid = ?", undef, $user->id); - if(Param('allowemailchange') + if(Bugzilla->params->{'allowemailchange'} && Bugzilla->user->authorizer->can_change_email) { my @token = $dbh->selectrow_array( "SELECT tokentype, issuedate + " . @@ -113,7 +113,7 @@ sub SaveAccount { } } - if(Param("allowemailchange") && $cgi->param('new_login_name')) { + if(Bugzilla->params->{"allowemailchange"} && $cgi->param('new_login_name')) { my $old_login_name = $cgi->param('Bugzilla_login'); my $new_login_name = trim($cgi->param('new_login_name')); @@ -200,7 +200,7 @@ sub DoEmail { ########################################################################### # User watching ########################################################################### - if (Param("supportwatchers")) { + if (Bugzilla->params->{"supportwatchers"}) { my $watched_ref = $dbh->selectcol_arrayref( "SELECT profiles.login_name FROM watch INNER JOIN profiles" . " ON watch.watched = profiles.userid" . @@ -298,7 +298,9 @@ sub SaveEmail { ########################################################################### # User watching ########################################################################### - if (Param("supportwatchers") && defined $cgi->param('watchedusers')) { + if (Bugzilla->params->{"supportwatchers"} + && defined $cgi->param('watchedusers')) + { # Just in case. Note that this much locking is actually overkill: # we don't really care if anyone reads the watch table. So # some small amount of contention could be gotten rid of by |