mirror of
https://github.com/processwire/processwire.git
synced 2025-08-14 10:45:54 +02:00
Update Process module interface for a new getAfterLoginUrl() method that Process modules can optionally implement to sanitize a requested URL to the module when the user is not logged in. This lets things like query strings and URL segments be retained after a user logs-in.
This commit is contained in:
@@ -600,4 +600,24 @@ abstract class Process extends WireData implements Module {
|
||||
$page = $this->wire('pages')->get("process=$moduleID, include=all");
|
||||
return $page;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL to redirect to after non-authenticated user is logged-in, or false if module does not support
|
||||
*
|
||||
* When supported, module should gather any input GET vars and URL segments that it recognizes,
|
||||
* sanitize them, and return a URL for that request. ProcessLogin will redirect to the returned URL
|
||||
* after user has successfully authenticated.
|
||||
*
|
||||
* If module does not support this, or only needs to support an integer 'id' GET var, then this
|
||||
* method can return false.
|
||||
*
|
||||
* @param Page $page Requested page
|
||||
* @return bool|string
|
||||
* @sine 3.0.167
|
||||
*
|
||||
*/
|
||||
public static function getAfterLoginUrl(Page $page) {
|
||||
if($page) {}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user