Beispiel #1
0
 public function create(UserModelInterface $user)
 {
     $data = [self::INDEX_USERID => $user->getUserId(), self::INDEX_USERNAME => $user->getUsername(), self::INDEX_LOGINTIME => time(), self::INDEX_LASTACTIVE => time(), self::INDEX_REMOTEADDR => $this->auth->getServerAttr('REMOTE_ADDR'), self::INDEX_USERAGENT => $this->auth->getServerAttr('HTTP_USER_AGENT'), self::INDEX_ISACTIVE => true];
     $this->session->set(self::KEY, new Config($data));
     return $this;
 }
Beispiel #2
0
 public function isCorrectPassword(UserModelInterface $user, $password)
 {
     return $this->getSecurity()->checkHash($password, $user->getPassword());
 }