forked from GNUsocial/gnu-social
Extend Action with redirect after login logic, update some actions to use it
This commit is contained in:
committed by
Diogo Cordeiro
parent
691df04103
commit
43df2d201c
@@ -60,6 +60,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||
protected $ajax = false;
|
||||
protected $menus = true;
|
||||
protected $needLogin = false;
|
||||
protected $redirectAfterLogin = false;
|
||||
protected $needPost = false; // implies canPost if true
|
||||
protected $canPost = false; // can this action handle POST method?
|
||||
|
||||
@@ -248,6 +249,10 @@ class Action extends HTMLOutputter // lawsuit
|
||||
if ($this->needLogin) {
|
||||
$this->checkLogin(); // if not logged in, this redirs/excepts
|
||||
}
|
||||
|
||||
if ($this->redirectAfterLogin) {
|
||||
common_set_returnto($this->selfUrl());
|
||||
}
|
||||
|
||||
$this->updateScopedProfile();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user