mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT: Added onBeforeSecurityLogin event handler to Security/login, for extensions to plug into
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@72346 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
15e91d6c97
commit
3222a080a4
@ -273,6 +273,18 @@ class Security extends Controller {
|
||||
* @return string Returns the "login" page as HTML code.
|
||||
*/
|
||||
public function login() {
|
||||
// Event handler for pre-login, with an option to let it break you out of the login form
|
||||
$eventResults = $this->extend('onBeforeSecurityLogin');
|
||||
// If there was a redirection, return
|
||||
if(Director::redirected_to()) return;
|
||||
// If there was an HTTPResponse object returned, then return that
|
||||
else if($eventResults) {
|
||||
foreach($eventResults as $result) {
|
||||
if($result instanceof HTTPResponse) return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$customCSS = project() . '/css/tabs.css';
|
||||
if(Director::fileExists($customCSS)) {
|
||||
Requirements::css($customCSS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user