/** * @return void */ public function successAction(User $loginUser) { session_start(); $users = $this->userRepository->findActiveUser(); $test = false; foreach ($users as $user) { if (strcmp($user->getName(), $loginUser->getName()) == 0) { if (strcmp($user->getPassword(), $loginUser->getPassword()) == 0) { $test = true; } else { $this->addFlashMessage("Sorry the password you enter is incorrect!"); $this->redirect('login'); } } } if ($test == false) { $this->addFlashMessage("Sorry name and password you enter is invalid!"); $this->redirect('login'); } $_SESSION['usrname'] = $loginUser->getName(); // \TYPO3\Flow\var_dump($this->userRepository->findUserIdentity($loginUser)); // die(); $_SESSION['identity'] = $this->userRepository->findUserIdentity($loginUser); //echo $_SESSION['usrname']; $this->redirect('index', 'form'); }
/** * {@inheritDoc} */ public function getPassword() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPassword', array()); return parent::getPassword(); }