Save return_url before login. Add login mask to many sites if not logged in.

This commit is contained in:
Jonny Tischbein 2018-10-07 16:34:08 +02:00
parent 772d735f12
commit 28456de249
7 changed files with 15 additions and 6 deletions

View file

@ -22,6 +22,7 @@ use Friendica\Network\Probe;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Core\ACL;
use Friendica\Module\Login;
function contacts_init(App $a)
{
@ -375,7 +376,7 @@ function contacts_content(App $a, $update = 0)
if (!local_user()) {
notice(L10n::t('Permission denied.') . EOL);
return;
return Login::form();
}
if ($a->argc == 3) {

View file

@ -17,6 +17,7 @@ use Friendica\Model\Item;
use Friendica\Model\Profile;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
use Friendica\Module\Login;
require_once 'include/items.php';
@ -193,7 +194,7 @@ function events_content(App $a)
{
if (!local_user()) {
notice(L10n::t('Permission denied.') . EOL);
return;
return Login::form();
}
if ($a->argc == 1) {

View file

@ -16,6 +16,7 @@ use Friendica\Model\Mail;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Temporal;
use Friendica\Module\Login;
require_once 'include/conversation.php';
@ -97,7 +98,7 @@ function message_content(App $a)
if (!local_user()) {
notice(L10n::t('Permission denied.') . EOL);
return;
return Login::form();
}
$myprofile = System::baseUrl() . '/profile/' . $a->user['nickname'];

View file

@ -12,6 +12,7 @@ use Friendica\Core\NotificationsManager;
use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Module\Login;
function notifications_post(App $a)
{
@ -65,7 +66,7 @@ function notifications_content(App $a)
{
if (!local_user()) {
notice(L10n::t('Permission denied.') . EOL);
return;
return Login::form();
}
$page = defaults($_REQUEST, 'page', 1);

View file

@ -20,6 +20,7 @@ use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Temporal;
use Friendica\Module\Login;
function profiles_init(App $a) {
@ -509,7 +510,7 @@ function profiles_content(App $a) {
if (! local_user()) {
notice(L10n::t('Permission denied.') . EOL);
return;
return Login::form();
}
$o = '';

View file

@ -22,6 +22,7 @@ use Friendica\Model\User;
use Friendica\Protocol\Email;
use Friendica\Util\Network;
use Friendica\Util\Temporal;
use Friendica\Module\Login;
function get_theme_config_file($theme)
{
@ -658,7 +659,7 @@ function settings_content(App $a)
if (!local_user()) {
//notice(L10n::t('Permission denied.') . EOL);
return;
return Login::form();
}
if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) {

View file

@ -47,7 +47,10 @@ class Login extends BaseModule
public static function post()
{
$return_url = $_SESSION['return_url'];
session_unset();
$_SESSION['return_url'] = $return_url;
// OpenId Login
if (
empty($_POST['password'])