Source of file SecurityLoginExtension.php
Size: 0,399 Bytes - Last Modified: 2021-12-23T10:25:20+00:00
/var/www/docs.ssmods.com/process/src/code/extensions/SecurityLoginExtension.php
12345678910111213141516171819 | <?php class SecurityLoginExtension extends Extension { public function onBeforeSecurityLogin() { // Determine whether a user has already authenticated, and whether a back URL exists. $URL = $this->owner->getRequest()->getVar('BackURL'); if(Member::currentUserID() && $URL && Director::is_site_url($URL)) { // Take the user to the back URL. $this->owner->redirect($URL); } } } |