summaryrefslogtreecommitdiffstats
path: root/votes.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'votes.cgi')
-rwxr-xr-xvotes.cgi5
1 files changed, 2 insertions, 3 deletions
diff --git a/votes.cgi b/votes.cgi
index 057304048..8bd007d60 100755
--- a/votes.cgi
+++ b/votes.cgi
@@ -126,10 +126,9 @@ sub show_user {
my $name = $cgi->param('user') || Bugzilla->user->login;
my $who = DBNameToIdAndCheck($name);
- my $userid = Bugzilla->user ? Bugzilla->user->id : 0;
+ my $userid = Bugzilla->user->id;
- my $canedit = 1 if (Bugzilla->user &&
- $name eq Bugzilla->user->login);
+ my $canedit = 1 if ($userid && $name eq Bugzilla->user->login);
SendSQL("LOCK TABLES bugs READ, products READ, votes WRITE,
cc READ, bug_group_map READ, user_group_map READ,