Skip to content

Commit 7fa76a8

Browse files
authored
Merge pull request #1 from zhblue/master
Update login-hustoj.php
2 parents 447dd0c + 3f8a586 commit 7fa76a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trunk/web/include/login-hustoj.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ function check_login($user_id,$password){
66
$pass2 = 'No Saved';
77
session_destroy();
88
session_start();
9-
$sql="INSERT INTO `loginlog` VALUES(?,'no save',?,NOW())";
10-
pdo_query($sql,$user_id,$_SERVER['REMOTE_ADDR']);
119
$sql="SELECT `user_id`,`password` FROM `users` WHERE `user_id`=? and defunct='N' ";
1210
$result=pdo_query($sql,$user_id);
1311
if(count($result)==1){
1412
$row = $result[0];
1513
if( pwCheck($password,$row['password'])){
1614
$user_id=$row['user_id'];
15+
$sql="INSERT INTO `loginlog` VALUES(?,'login ok',?,NOW())";
16+
pdo_query($sql,$user_id,$_SERVER['REMOTE_ADDR']);
1717
return $user_id;
1818
}
1919
}

0 commit comments

Comments
 (0)