Skip to content

Instantly share code, notes, and snippets.

@andevsoftware
Last active February 28, 2016 19:48
Show Gist options
  • Select an option

  • Save andevsoftware/e40edf06c5dddb5c25e0 to your computer and use it in GitHub Desktop.

Select an option

Save andevsoftware/e40edf06c5dddb5c25e0 to your computer and use it in GitHub Desktop.
Phalcon REST - AuthManager get identity
<?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