Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function signInFormSucceeded($form, $values)
- {
- $user = $this->getUser();
- if ($values->remember) {
- $user->setExpiration('14 days', FALSE);
- } else {
- $user->setExpiration('20 minutes', TRUE);
- }
- try {
- $user->login($values->username, $values->password);
- if($user->getRoles() == "admin") //tady je asi chyba
- {
- $this->redirect('Admin:');
- }
- //$this->redirect('Homepage:');
- } catch (Nette\Security\AuthenticationException $e) {
- $form->addError($e->getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement