@@ -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