Skip to content

Commit 9840852

Browse files
committed
Fix #1 Wrong arguments for password_verify()
1 parent 2387338 commit 9840852

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Controller/Admin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ public function login()
2020
$this->oUtil->getModel('Admin');
2121
$this->oModel = new \TestProject\Model\Admin;
2222

23-
$sDbPassword = $this->oModel->login($_POST['email']);
24-
if (password_verify($sDbPassword, $_POST['password']))
23+
$sHashPassword = $this->oModel->login($_POST['email']);
24+
if (password_verify($_POST['password'], $sHashPassword))
2525
{
2626
$_SESSION['is_logged'] = 1; // Admin is logged now
2727
header('Location: ' . ROOT_URL . '?p=blog&a=all');

0 commit comments

Comments
 (0)