You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey.. logging out is possible by visiting /logout
But whats a solution for a simple frontend login-page with maybe redirect to / after login?
accessing /no-permission to login, results into:
TypeError thrown with message "Argument 1 passed to go() must be of the type string, null given, called in /var/www/html/site/plugins/kirby-securedpages-1.2.0/src/loginform/LoginFormCtrl.php on line 31"
Stacktrace:
#9 TypeError in /var/www/html/kirby/config/helpers.php:223
#8 go in /var/www/html/site/plugins/kirby-securedpages-1.2.0/src/loginform/LoginFormCtrl.php:31
#7 Kirby\Cms\App:{closure} in [internal]:0
#6 Closure:call in /var/www/html/kirby/src/Toolkit/Controller.php:49
#5 Kirby\Toolkit\Controller:call in /var/www/html/kirby/src/Cms/App.php:459
#4 Kirby\Cms\App:controller in /var/www/html/kirby/src/Cms/Page.php:348
#3 Kirby\Cms\Page:controller in /var/www/html/kirby/src/Cms/Page.php:1169
#2 Kirby\Cms\Page:render in /var/www/html/kirby/src/Cms/App.php:686
#1 Kirby\Cms\App:io in /var/www/html/kirby/src/Cms/App.php:1039
#0 Kirby\Cms\App:render in /var/www/html/index.php:35
so it seems there needs to be a default argument to let go() never go empty.
my solution in src/loginform/LoginFormCtrl.php:
if ($form->success()) {
// go(get('prevloc'));
if (!empty(get('prevloc'))) {
go(get('prevloc'));
} else {
go('/');
}
}
no, it is possible to go to /no-permission to get default Login-Page. And after Login, you are redirected to /
this could also be changed to a specific option like kerli81.securedpages.loginform.default.go or similar..
(sorry, i am not familiar with git/github to add a pull request)
The text was updated successfully, but these errors were encountered:
hey.. logging out is possible by visiting
/logout
But whats a solution for a simple frontend login-page with maybe redirect to
/
after login?accessing
/no-permission
to login, results into:so it seems there needs to be a default argument to let
go()
never go empty.my solution in
src/loginform/LoginFormCtrl.php
:no, it is possible to go to
/no-permission
to get default Login-Page. And after Login, you are redirected to/
this could also be changed to a specific option like
kerli81.securedpages.loginform.default.go
or similar..(sorry, i am not familiar with git/github to add a pull request)
The text was updated successfully, but these errors were encountered: