示例#1
0
 /**
  * set the current session user
  *
  * @param	User		$user
  */
 protected function setCurrentUser(User $user)
 {
     if (!class_exists('WCFWrapper')) {
         require_once 'WCFWrapper.php';
     }
     WCFWrapper::setUser($user->userID);
 }
示例#2
0
 /**
  * this is a useful helper method for unittests
  * @param	integer		$userID
  * @return 	void
  */
 public static function setUser($userID)
 {
     require_once WCF_DIR . 'lib/system/session/UserSession.class.php';
     self::$userObj = new WCFNullwrapper(new UserSession($userID));
 }