* @copyright 2004 by gERD Schaufelberger * @package wombat * @subpackage admin */ /** * admin interface * * * @version 1.1.0 * @package wombat * @subpackage Admin */ class wbAuth_Wombat { /** * wbUser object * @var object $_user */ var $_user; /** * constructor * * @access public */ function __construct( $config ) { $params = array( 'flags' => null ); if( isset( $config['flags'] ) ) { $params['flags'] = $config['flags']; } $this->_user = wbFactory::singleton( 'wbUser', $params ); } /** * constructor wrapper for PHP4 * * @access public * @see __construct() */ function wbAuth_Wombat( $config ) { $this->__construct( $config ); } /** * try to login * * @access public * @param string $user user name * @param string $password user password * @return boolean $result true if user is logged in */ function login( $user, $password ) { return $this->_user->login( $user, $password ); } /** * logout user * * @access public * @return boolean $result true on success */ function logoff() { return $this->_user->logoff(); } /** * recieve internal user id * * @access public * @return boolean $result true on success */ function getUserId() { return $this->_user->getUserId(); } /** * recieve user data * * @access public * @return boolean $result true on success */ function getUserData() { return $this->_user->getUserData(); } } ?>