diff --git a/security/Security.php b/security/Security.php index bb59e5332..3eae5e660 100644 --- a/security/Security.php +++ b/security/Security.php @@ -353,8 +353,7 @@ class Security extends Controller { $member = BasicAuth::requireLogin("SilverStripe login", 'ADMIN'); $member->LogIn(); } - - + /** * Show the "lost password" page * @@ -505,6 +504,14 @@ class Security extends Controller { //Controller::$currentController = $controller; return $customisedController->renderWith($this->stat('template_main')); } + + /** + * Security/ping can be visited with ajax to keep a session alive. + * This is used in the CMS. + */ + function ping() { + return 1; + } /**