OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-registry                 Date:   08-Aug-2006 11:21:50
  Branch: HEAD                             Handle: 2006080810214900

  Modified files:
    openpkg-registry        registry-ui.pl

  Log:
    display token hint for successful logins only

  Summary:
    Revision    Changes     Path
    1.93        +20 -20     openpkg-registry/registry-ui.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-registry/registry-ui.pl
  ============================================================================
  $ cvs diff -u -r1.92 -r1.93 registry-ui.pl
  --- openpkg-registry/registry-ui.pl   8 Aug 2006 09:18:16 -0000       1.92
  +++ openpkg-registry/registry-ui.pl   8 Aug 2006 09:21:49 -0000       1.93
  @@ -1159,31 +1159,31 @@
   
           $html .= "<h2>Login&nbsp;successful</h2>\n";
           $html .= "Welcome,<br/>\n" . (($fullname ne "") ? $fullname : 
$username) . "<br/>\n";
  +
  +        if ($cfg->{profile}->{token}->{uienable}) {
  +            #   create a user token if user does not yet have a user token
  +            $sql = sprintf("SELECT count(userenable) FROM reg_token WHERE ( 
username = '%s' );", $username);
  +            $rv = $dbh->selectrow_arrayref($sql);
  +            if (not $rv) {
  +                die "ERROR:$0: DataBase error: ".$dbh->errstr."\n";
  +            }
  +            if ($rv->[0] == 0) {
  +                $html .= q{<p/>
  +                    Please note you can create a user token and use it as a 
replacement for
  +                    your (email) login when running <code>openpkg 
register</code>. This is
  +                    useful for writing scripts and documentation without 
revealing your
  +                    email address. All you need to do is visit the profile 
tab and issue a
  +                    new token. Tokens with additional capabilities like 
automatic instance
  +                    association without manual web interface usage are 
available if you
  +                    update your profile with additional information.
  +                };
  +            }
  +        }
       }
       else {
           $html .= "<h2>Login&nbsp;failed</h2>\n";
       }
   
  -    if ($cfg->{profile}->{token}->{uienable}) {
  -        #   create a user token if user does not yet have a user token
  -        $sql = sprintf("SELECT count(userenable) FROM reg_token WHERE ( 
username = '%s' );", $username);
  -        $rv = $dbh->selectrow_arrayref($sql);
  -        if (not $rv) {
  -            die "ERROR:$0: DataBase error: ".$dbh->errstr."\n";
  -        }
  -        if ($rv->[0] == 0) {
  -            $html .= q{<p/>
  -                Please note you can create a user token and use it as a 
replacement for
  -                your (email) login when running <code>openpkg 
register</code>. This is
  -                useful for writing scripts and documentation without 
revealing your
  -                email address. All you need to do is visit the profile tab 
and issue a
  -                new token. Tokens with additional capabilities like 
automatic instance
  -                association without manual web interface usage are available 
if you
  -                update your profile with additional information.
  -            };
  -        }
  -    }
  -
       $html .= &viewhtmltail();
   
       #   HTTP message
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to