Removes legacy MySQL password support
This commit is contained in:
1 parent
6190f6e643
commit
b22be5427f
2 files changed
+3
-4
No files matched your search
+1
-2
@@ -115,9 +115,8 @@ function legacy_get_user_from_mail($mail) {
|
||||
function legacy_authenticate($username, $password) {
|
||||
$conn = db_connect();
|
||||
/* query db with form data (password, username) */
|
||||
$sql = sprintf("SELECT id FROM din_user WHERE username = %s AND (password = PASSWORD(%s) or password = OLD_PASSWORD(%s))",
|
||||
$sql = sprintf("SELECT id FROM din_user WHERE username = %s AND password = PASSWORD(%s)",
|
||||
$conn->quoteSmart($username),
|
||||
$conn->quoteSmart($password),
|
||||
$conn->quoteSmart($password));
|
||||
|
||||
$result = $conn->query($sql);
|
||||
|
||||
@@ -38,7 +38,7 @@ class App_Mapper_UserMapper extends App_Mapper_Mapper {
|
||||
//$this->deleteStmt = self::$PDO->prepare(
|
||||
// "DELETE FROM din_user WHERE id=?");
|
||||
$this->findByLoginStmt = self::$PDO->prepare(
|
||||
"SELECT * FROM din_user WHERE username=? AND ( password=PASSWORD(?) or password=OLD_PASSWORD(?) )");
|
||||
"SELECT * FROM din_user WHERE username=? AND password=PASSWORD(?)");
|
||||
}
|
||||
|
||||
protected function doCreateObject(array $array) {
|
||||
@@ -123,4 +123,4 @@ class App_Mapper_UserMapper extends App_Mapper_Mapper {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in new issue
Block a user