Skip to content

Commit

Permalink
Merge branch 'release/3.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhukster committed Oct 3, 2019
2 parents b6ca8fc + 0638bf6 commit d63f62f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 3.0.4
## 10/03/2019

1. [](#bugfix)
* Fixed bad redirect after login on multi-language site [#217](https://github.com/getgrav/grav-plugin-login/issues/217)
* Fixed basic login not obeying `redirect_after_login` option
* Provide default `redirect_after_activation` option [#225](https://github.com/getgrav/grav-plugin-login/issues/225)

# 3.0.3
## 07/01/2019

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Login
version: 3.0.3
version: 3.0.4
testing: false
description: Enables user authentication and login screen.
icon: sign-in
Expand Down
4 changes: 3 additions & 1 deletion classes/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ public function taskLogin()
$event->defMessage('PLUGIN_LOGIN.LOGIN_SUCCESSFUL', 'info');

$event->defRedirect(
$this->grav['session']->redirect_after_login ?: $this->grav['uri']->referrer('/')
$this->grav['session']->redirect_after_login ?:
$this->grav['config']->get('plugins.login.redirect_after_login') ?:
$this->grav['uri']->referrer('/')
);
} else {
$login_route = $this->grav['config']->get('plugins.login.route');
Expand Down
1 change: 1 addition & 0 deletions login.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ user_registration:
login: 'true'

redirect_after_registration: '' # Route to redirect to after registration
redirect_after_activation: '' # Route to redirect to after activation

options:
validate_password1_and_password2: true # Ensure that password1 and password2 match during registration (allows you to have just 1 pw field or 2)
Expand Down

0 comments on commit d63f62f

Please sign in to comment.