Merge pull request #5853 from JonnyTischbein/issue_login_redirect-fixed
Return to previous page after login
This commit is contained in:
commit
ebe87bb16d
7 changed files with 15 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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'];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
|
@ -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'])) {
|
||||
|
|
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue