Changeset 316
- Timestamp:
- 04/25/12 17:07:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r314 r316 1149 1149 ## DNSDB::login() 1150 1150 # Takes a database handle, username and password 1151 # Returns a userdata hash (UID, GID, username, fullname parts) if username exists 1152 # and password matches the one on file1151 # Returns a userdata hash (UID, GID, username, fullname parts) if username exists, 1152 # password matches the one on file, and account is not disabled 1153 1153 # Returns undef otherwise 1154 1154 sub login { … … 1157 1157 my $pass = shift; 1158 1158 1159 my $userinfo = $dbh->selectrow_hashref("SELECT user_id,group_id,password,firstname,lastname FROM users WHERE username=?", 1159 my $userinfo = $dbh->selectrow_hashref("SELECT user_id,group_id,password,firstname,lastname,status". 1160 " FROM users WHERE username=?", 1160 1161 undef, ($user) ); 1161 1162 return if !$userinfo; 1163 return if !$userinfo->{status}; 1162 1164 1163 1165 if ($userinfo->{password} =~ m|^\$1\$([A-Za-z0-9/.]+)\$|) {
Note:
See TracChangeset
for help on using the changeset viewer.