We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fe5ee6 commit e87f71eCopy full SHA for e87f71e
app/controller/user/login-trait.php
@@ -28,6 +28,8 @@
28
use Vvveb\System\Validator;
29
30
trait LoginTrait {
31
+ protected $redirectUrl;
32
+
33
function login() {
34
if (isset($this->request->post['logout'])) {
35
$success = __('Logout successful!');
@@ -51,7 +53,7 @@ function login() {
51
53
$this->session->close();
52
54
$this->view->success['login'] = $success;
55
$this->view->global['user_id'] = $user['user_id'];
- $this->redirect('/user');
56
+ $this->redirect($this->redirectUrl ?? '/user');
57
} else {
58
//user not found or wrong password
59
$this->view->errors['login'] = __('Authentication failed, wrong email or password!');
0 commit comments