Save return_url before login. Add login mask to many sites if not logged in.
This commit is contained in:
parent
772d735f12
commit
28456de249
|
@ -22,6 +22,7 @@ use Friendica\Network\Probe;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Proxy as ProxyUtils;
|
use Friendica\Util\Proxy as ProxyUtils;
|
||||||
use Friendica\Core\ACL;
|
use Friendica\Core\ACL;
|
||||||
|
use Friendica\Module\Login;
|
||||||
|
|
||||||
function contacts_init(App $a)
|
function contacts_init(App $a)
|
||||||
{
|
{
|
||||||
|
@ -375,7 +376,7 @@ function contacts_content(App $a, $update = 0)
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.') . EOL);
|
notice(L10n::t('Permission denied.') . EOL);
|
||||||
return;
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->argc == 3) {
|
if ($a->argc == 3) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ use Friendica\Model\Item;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
|
use Friendica\Module\Login;
|
||||||
|
|
||||||
require_once 'include/items.php';
|
require_once 'include/items.php';
|
||||||
|
|
||||||
|
@ -193,7 +194,7 @@ function events_content(App $a)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.') . EOL);
|
notice(L10n::t('Permission denied.') . EOL);
|
||||||
return;
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($a->argc == 1) {
|
if ($a->argc == 1) {
|
||||||
|
|
|
@ -16,6 +16,7 @@ use Friendica\Model\Mail;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Proxy as ProxyUtils;
|
use Friendica\Util\Proxy as ProxyUtils;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
|
use Friendica\Module\Login;
|
||||||
|
|
||||||
require_once 'include/conversation.php';
|
require_once 'include/conversation.php';
|
||||||
|
|
||||||
|
@ -97,7 +98,7 @@ function message_content(App $a)
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.') . EOL);
|
notice(L10n::t('Permission denied.') . EOL);
|
||||||
return;
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
$myprofile = System::baseUrl() . '/profile/' . $a->user['nickname'];
|
$myprofile = System::baseUrl() . '/profile/' . $a->user['nickname'];
|
||||||
|
|
|
@ -12,6 +12,7 @@ use Friendica\Core\NotificationsManager;
|
||||||
use Friendica\Core\Protocol;
|
use Friendica\Core\Protocol;
|
||||||
use Friendica\Core\System;
|
use Friendica\Core\System;
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
use Friendica\Module\Login;
|
||||||
|
|
||||||
function notifications_post(App $a)
|
function notifications_post(App $a)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +66,7 @@ function notifications_content(App $a)
|
||||||
{
|
{
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
notice(L10n::t('Permission denied.') . EOL);
|
notice(L10n::t('Permission denied.') . EOL);
|
||||||
return;
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
$page = defaults($_REQUEST, 'page', 1);
|
$page = defaults($_REQUEST, 'page', 1);
|
||||||
|
|
|
@ -20,6 +20,7 @@ use Friendica\Model\Profile;
|
||||||
use Friendica\Network\Probe;
|
use Friendica\Network\Probe;
|
||||||
use Friendica\Util\DateTimeFormat;
|
use Friendica\Util\DateTimeFormat;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
|
use Friendica\Module\Login;
|
||||||
|
|
||||||
function profiles_init(App $a) {
|
function profiles_init(App $a) {
|
||||||
|
|
||||||
|
@ -509,7 +510,7 @@ function profiles_content(App $a) {
|
||||||
|
|
||||||
if (! local_user()) {
|
if (! local_user()) {
|
||||||
notice(L10n::t('Permission denied.') . EOL);
|
notice(L10n::t('Permission denied.') . EOL);
|
||||||
return;
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
|
@ -22,6 +22,7 @@ use Friendica\Model\User;
|
||||||
use Friendica\Protocol\Email;
|
use Friendica\Protocol\Email;
|
||||||
use Friendica\Util\Network;
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\Temporal;
|
use Friendica\Util\Temporal;
|
||||||
|
use Friendica\Module\Login;
|
||||||
|
|
||||||
function get_theme_config_file($theme)
|
function get_theme_config_file($theme)
|
||||||
{
|
{
|
||||||
|
@ -658,7 +659,7 @@ function settings_content(App $a)
|
||||||
|
|
||||||
if (!local_user()) {
|
if (!local_user()) {
|
||||||
//notice(L10n::t('Permission denied.') . EOL);
|
//notice(L10n::t('Permission denied.') . EOL);
|
||||||
return;
|
return Login::form();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) {
|
if (x($_SESSION, 'submanage') && intval($_SESSION['submanage'])) {
|
||||||
|
|
|
@ -47,7 +47,10 @@ class Login extends BaseModule
|
||||||
|
|
||||||
public static function post()
|
public static function post()
|
||||||
{
|
{
|
||||||
|
$return_url = $_SESSION['return_url'];
|
||||||
session_unset();
|
session_unset();
|
||||||
|
$_SESSION['return_url'] = $return_url;
|
||||||
|
|
||||||
// OpenId Login
|
// OpenId Login
|
||||||
if (
|
if (
|
||||||
empty($_POST['password'])
|
empty($_POST['password'])
|
||||||
|
|
Loading…
Reference in a new issue