mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
* Enh #6458: Redirect to the latest-visited page after login or registration * Only for ajax * Store Return URL --------- Co-authored-by: Lucas Bartholemy <lucas@bartholemy.com>
This commit is contained in:
parent
f4d86ef2fd
commit
1cc8a9413e
@ -87,3 +87,4 @@ HumHub Changelog
|
||||
- Chg #6174: Users allowed to manage settings can access to module configurations
|
||||
- Enh #6440: Sort user groups by `group.sort_order` and alphabetically
|
||||
- Enh #6454: Account deletion confirmation
|
||||
- Enh #6458: Redirect to the latest-visited page after login or registration
|
||||
|
@ -53,6 +53,7 @@ class ErrorController extends Controller
|
||||
* Show special login required view for guests
|
||||
*/
|
||||
if (Yii::$app->user->isGuest && $exception instanceof HttpException && $exception->statusCode == '401' && AuthHelper::isGuestAccessEnabled()) {
|
||||
Yii::$app->user->setReturnUrl(Yii::$app->request->getAbsoluteUrl());
|
||||
return $this->render('@humhub/views/error/401_guests', ['message' => $message]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user