Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4981f23

Browse files
committed
Put back previous coding style to make the project relevant
1 parent 668df66 commit 4981f23

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎Controller/Admin.php‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@ public function login()
1515
if ($this->isLogged())
1616
header('Location: ' . ROOT_URL . '?p=blog&a=all');
1717

18-
if (isset($_POST['email'], $_POST['password'])) {
18+
if (isset($_POST['email'], $_POST['password']))
19+
{
1920
$this->oUtil->getModel('Admin');
2021
$this->oModel = new \TestProject\Model\Admin;
2122

2223
$sDbPassword = $this->oModel->login($_POST['email']);
23-
if (password_verify($sDbPassword, $_POST['email'])) {
24+
if (password_verify($sDbPassword, $_POST['email']))
25+
{
2426
$_SESSION['is_logged'] = 1; // Admin is logged now
2527
header('Location: ' . ROOT_URL . '?p=blog&a=all');
2628
exit;
27-
} else {
29+
}
30+
else
31+
{
2832
$this->oUtil->sErrMsg = 'Incorrect Login!';
2933
}
3034
}
@@ -34,7 +38,8 @@ public function login()
3438

3539
public function logout()
3640
{
37-
if (!$this->isLogged()) exit;
41+
if (!$this->isLogged())
42+
exit;
3843

3944
// If there is a session, destroy it to disconnect the admin
4045
if (!empty($_SESSION))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /