for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Custom Admin Login form screen.
*
* This login screen get also ip based access protection when enabled
* @property Security $owner
*/
class AdminLoginExtension extends Extension
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
* Redirect to AdminSecurity, when we are coming from /admin/*.
* @return SS_HTTPResponse|void
public function onBeforeSecurityLogin()
$backUrl = $this->owner->getRequest()->getVar('BackURL');
if (strstr($backUrl, '/admin/')) {
if (Controller::curr()->class != 'AdminSecurity') {
$link = 'AdminSecurity/login'.'?BackURL='.urlencode($backUrl);
return $this->owner->redirect($link);
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.