Last active
February 28, 2016 19:48
-
-
Save andevsoftware/e40edf06c5dddb5c25e0 to your computer and use it in GitHub Desktop.
Phalcon REST - AuthManager get identity
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 | |
| if ($this->authManager->loggedIn()) { | |
| $session = $this->authManager->getSession(); | |
| $userId = $session->getIdentity(); // For example; 1 | |
| $user = \Users::findFirstById($userId); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment