Login prototype

This commit is contained in:
Michael 2021-05-11 06:30:20 +00:00
parent b014f349ae
commit 82003bbe47
11 changed files with 269 additions and 12 deletions

View file

@ -36,8 +36,12 @@ class Login extends BaseModule
{
public static function content(array $parameters = [])
{
$return_path = !isset($_REQUEST['return_path']) ? '' : $_REQUEST['return_path'];
if (local_user()) {
DI::baseUrl()->redirect();
DI::baseUrl()->redirect($return_path);
} elseif (!empty($return_path)) {
Session::set('return_path', $return_path);
}
return self::form(Session::get('return_path'), intval(DI::config()->get('config', 'register_policy')) !== \Friendica\Module\Register::CLOSED);