You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: a2/server.php
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -63,15 +63,15 @@ public function __call($method, $arguments)
63
63
$pdo->beginTransaction();
64
64
65
65
$db->create_user->execute(array(
66
-
'username' => $pdo->quote($username),
67
-
'passwd' => $pdo->quote($passwd),
68
-
'email' => $pdo->quote($email),
69
-
'modified' => $pdo->quote($modified)
66
+
'username' => $username,
67
+
'passwd' => $passwd,
68
+
'email' => $email,
69
+
'modified' => $modified
70
70
));
71
71
72
72
$db->create_login_info->execute(array(
73
-
'username' => $pdo->quote($username),
74
-
'salt' => $pdo->quote($salt)
73
+
'username' => $username,
74
+
'salt' => $salt
75
75
));
76
76
77
77
$pdo->commit();
@@ -85,6 +85,10 @@ public function __call($method, $arguments)
85
85
}
86
86
};
87
87
88
+
// identify
89
+
$db->get_login_info_by_username = $pdo->prepare("SELECT valid, salt, challenge, expires FROM user LEFT OUTER JOIN user_login USING (username) WHERE username = :username");
90
+
$db->update_login_info_by_username = $pdo->prepare("UPDATE user_login SET challenge = :challenge, expires = :expires WHERE username = :username");
0 commit comments