ElggSession::getLoggedInUserGuid PHP Method

getLoggedInUserGuid() public method

Return the current logged in user by guid.
See also: elgg_get_logged_in_user_entity()
public getLoggedInUserGuid ( ) : integer
return integer
    public function getLoggedInUserGuid()
    {
        $user = $this->getLoggedInUser();
        return $user ? $user->guid : 0;
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Get a key to represent the access ability of the system. This is used to shard the cache array.
  *
  * @return string E.g. "ignored" or "123"
  */
 protected function getAccessKey()
 {
     if ($this->session->getIgnoreAccess()) {
         return "ignored";
     }
     return (string) $this->session->getLoggedInUserGuid();
 }
All Usage Examples Of ElggSession::getLoggedInUserGuid