From 1d057f02b277d29ad4d232d598c49b0344798b40 Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Tue, 3 Jun 2003 16:47:37 +0000 Subject: Bug 180635 - Enhance Bugzilla::User to store additional information r=myk,jake --- votes.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'votes.cgi') diff --git a/votes.cgi b/votes.cgi index aa2352f4a..1c7bc7816 100755 --- a/votes.cgi +++ b/votes.cgi @@ -127,7 +127,7 @@ sub show_user { # If a bug_id is given, and we're editing, we'll add it to the votes list. my $bug_id = $::FORM{'bug_id'} || ""; - my $name = $::FORM{'user'} || $::COOKIE{'Bugzilla_login'}; + my $name = $::FORM{'user'} || Bugzilla->user->login; my $who = DBname_to_id($name); # After DBNameToIdAndCheck is templatised and prints a Content-Type, @@ -135,7 +135,7 @@ sub show_user { # special error handling should go away. $who || ThrowUserError("invalid_username", {name => $name}); - my $canedit = 1 if ($name eq $::COOKIE{'Bugzilla_login'}); + my $canedit = 1 if ($name eq Bugzilla->user->login); SendSQL("LOCK TABLES bugs READ, products READ, votes WRITE, cc READ, bug_group_map READ, user_group_map READ, @@ -270,7 +270,7 @@ sub record_votes { GetVersionTable(); - my $who = DBNameToIdAndCheck($::COOKIE{'Bugzilla_login'}); + my $who = Bugzilla->user->id; # If the user is voting for bugs, make sure they aren't overstuffing # the ballot box. -- cgit v1.2.3-24-g4f1b