Better docblock type hinting for stores.
This commit is contained in:
parent
cccf0b9869
commit
d060227fbd
10 changed files with 105 additions and 50 deletions
|
|
@ -19,10 +19,15 @@ use b8;
|
|||
*/
|
||||
class SessionController extends \PHPCI\Controller
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Store\UserStore
|
||||
*/
|
||||
protected $userStore;
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->response->disableLayout();
|
||||
$this->_userStore = b8\Store\Factory::getStore('User');
|
||||
$this->userStore = b8\Store\Factory::getStore('User');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +38,7 @@ class SessionController extends \PHPCI\Controller
|
|||
$isLoginFailure = false;
|
||||
|
||||
if ($this->request->getMethod() == 'POST') {
|
||||
$user = $this->_userStore->getByEmail($this->getParam('email'));
|
||||
$user = $this->userStore->getByEmail($this->getParam('email'));
|
||||
|
||||
if ($user && password_verify($this->getParam('password', ''), $user->getHash())) {
|
||||
$_SESSION['user_id'] = $user->getId();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue