Last active
June 26, 2019 15:49
-
-
Save cgi-caesar/b1be0f52bda19a6ac9243d31e0b22839 to your computer and use it in GitHub Desktop.
aMember (site.php): Dynamically override redirect after login URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Am_Di::getInstance()->hook->add(Am_Event::AUTH_GET_OK_REDIRECT, function(Am_Event $e) { | |
| /* @var $user User */ | |
| $user = $e->getUser(); | |
| if (stripos($e->getReturn(), '/signup') !== false) { | |
| $e->setReturn($e->getDi()->url('member', false)); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment