Changeset 472


Ignore:
Timestamp:
03/12/13 16:37:46 (12 years ago)
Author:
Kris Deugau
Message:

/trunk

Remove stale sub checkUser (effectively replaced by login)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r471 r472  
    28492849  return \@userlist;
    28502850} # end getUserDropdown()
    2851 
    2852 
    2853 ## DNSDB::checkUser()
    2854 # Check user/pass combo on login
    2855 sub checkUser {
    2856   my $dbh = shift;
    2857   my $user = shift;
    2858   my $inpass = shift;
    2859 
    2860   my $sth = $dbh->prepare("SELECT user_id,group_id,password,firstname,lastname FROM users WHERE username=?");
    2861   $sth->execute($user);
    2862   my ($uid,$gid,$pass,$fname,$lname) = $sth->fetchrow_array;
    2863   my $loginfailed = 1 if !defined($uid);
    2864 
    2865   if ($pass =~ m|^\$1\$([A-Za-z0-9/.]+)\$|) {
    2866     $loginfailed = 1 if $pass ne unix_md5_crypt($inpass,$1);
    2867   } else {
    2868     $loginfailed = 1 if $pass ne $inpass;
    2869   }
    2870 
    2871   # nnnngggg
    2872   return ($uid, $gid);
    2873 } # end checkUser
    28742851
    28752852
Note: See TracChangeset for help on using the changeset viewer.