* @package gsControllertest */ include_once '../include/wbFactory.php'; wbFactory::configure(); $user =& wbFactory::singleton( 'wbUser' ); $sess =& wbFactory::singleton( 'patSession' ); $idOld = $sess->getId(); if( isset( $_GET['auth'] ) && $_GET['auth'] === 'relogin' ) { $user->logoff(); } $auth = $user->isAuthenticated(); if( !$auth ) { $user->login( 'gerd', 'gerd123' ); } $url = $_SERVER['PHP_SELF'] . '?' . $sess->getQueryString(); echo 'Self! '; echo 'relogin
'; echo "auth: " . $auth . "
\n"; // user data $data = $user->getUserData(); echo "data\n
";
	print_r( $data );
	echo "
\n"; if( $user->checkGroup( 'GumNut' ) ) { echo "user is in group: GumNut
\n"; } $idNew = $sess->getId(); echo "Session
\n";
	echo "Count: " . $sess->getCounter() . "\n";
	echo "ID Old: " . $idOld . "\n";
	echo "ID New: " . $idNew . "\n";
	echo "
\n"; exit; // uid $uid = $user->getUserId(); echo "uid: " . $uid . "
\n"; $group = $user->addGroup( 'native speaker' ); echo "add group: " . $group . "
\n"; $group = $user->addGroup( 'foreign speaker' ); echo "add group: " . $group . "
\n"; // add user to group $res = $user->addUserToGroups( $uid, 'native speaker' ); $res = $user->addUserToGroups( $uid, 'foreign speaker' ); $user->removeUserFromGroups( $uid, 'native speaker' ); // $group = $user->removeGroup( 'native speaker' ); // $group = $user->removeGroup( 'foreign speaker' ); $groups = $user->getGroups( $uid ); echo "groups\n
";
	print_r( $groups );
	echo "
\n"; wbDebugger::printMsg(); ?>