setUser() public method

This method is called by SyncML right after sessionStart() when either authentication is accepted via checkAuthentication() or a valid user has been retrieved from the state. $this->_user together with $this->_syncDeviceID is used as an additional key for all persistence operations. This method may have to force a "login", when the backend doesn't keep auth state within a session or when in test mode.
public setUser ( string $user )
$user string A user name.
Exemplo n.º 1
0
 /**
  * Sets the user used for this session.
  *
  * @param string $user  A user name.
  */
 public function setUser($user)
 {
     parent::setUser($user);
     if ($this->_backendMode == Horde_SyncMl_Backend::MODE_TEST) {
         /* After a session the user gets automatically logged out, so we
          * have to login again. */
         $GLOBALS['registry']->setAuth($this->_user, array());
     }
 }