[bugzilla-gnome-org-extensions] describe user: Try fixing user info page for other accounts



commit 214538d5120f490aee52a9137fdd046933eae349
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Wed Dec 17 23:13:07 2014 +0100

    describe user: Try fixing user info page for other accounts
    
    It was checking logins inequality using numeric comparison (!=)
    instead of string comparison (ne).
    
    Simplify the code a bit in the meantime.

 DescribeUser/lib/Util.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/DescribeUser/lib/Util.pm b/DescribeUser/lib/Util.pm
index 16793d2..d2534d0 100644
--- a/DescribeUser/lib/Util.pm
+++ b/DescribeUser/lib/Util.pm
@@ -63,7 +63,7 @@ sub _page_describeuser {
     my $to_be_conjugation;
     my $login = $cgi->param('login');
 
-    if (defined($login) && (!Bugzilla->user->id || (trim($login) != Bugzilla->user->login))) {
+    if (defined($login) && (!$userid || (trim($login) ne $user->login))) {
         $r_userid = login_to_id(trim($login));
         if ($r_userid == 0) {
             ThrowUserError('invalid_username', { 'name' => $login });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]