getUid() public method

Return the users uid.
public getUid ( ) : string
return string The users uid.
Example #1
0
 /**
  * Reset the current session information in case it does not match the
  * authentication information anymore.
  *
  * @param string $user The user the session information is being requested
  *                     for. This is usually empty, indicating the current
  *                     user.
  *
  * @return boolean True if the session is still valid.
  */
 public function validate($user = null)
 {
     $mail = $this->_session->getMail();
     if ($this->_auth != $mail) {
         $this->_session->purge();
         return false;
     }
     if (empty($user)) {
         return true;
     }
     if ($user != $mail && $user != $this->_session->getUid()) {
         $this->_session->purge();
         return false;
     }
     return true;
 }
Example #2
0
 /**
  * Return the users uid.
  *
  * @return string The users uid.
  */
 public function getUid()
 {
     return $this->_session->getUid();
 }