public function getOneUser($login,  core_kernel_classes_Class $class = null)
    {
        $returnValue = null;

    	if(empty($class)){
        	$class = new core_kernel_classes_Class(GenerisRdf::CLASS_GENERIS_USER);
    	}
        
    	$users = $class->searchInstances(
    		array(GenerisRdf::PROPERTY_USER_LOGIN => $login), 
    		array('like' => false, 'recursive' => true)
    	);
    	
    	if (count($users) == 1){
    		$returnValue = current($users);	
    	}
    	else if (count($users) > 1){
    		$msg = "More than one user have the same login '${login}'.";
    	}

        return $returnValue;
    }
public function getOneUser($login,  core_kernel_classes_Class $class = null)
    {
        $returnValue = null;

    	if(empty($class)){
        	$class = new core_kernel_classes_Class(GenerisRdf::CLASS_GENERIS_USER);
    	}
        
    	$users = $class->searchInstances(
    		array(GenerisRdf::PROPERTY_USER_LOGIN => $login), 
    		array('like' => false, 'recursive' => true)
    	);
    	
    	if (count($users) == 1){
    		$returnValue = current($users);	
    	}
    	else if (count($users) > 1){
    		$msg = "More than one user have the same login '${login}'.";
    	}

        return $returnValue;
    }
public function getOneUser ( $ login , core_kernel_classes_Class $ class = null ) { $ returnValue = null ; if ( empty ( $ class ) ) { $ class = new core_kernel_classes_Class ( GenerisRdf :: CLASS_GENERIS_USER ) ; } $ users = $ class -> searchInstances ( array ( GenerisRdf :: PROPERTY_USER_LOGIN => $ login ) , array ( 'like' => false , 'recursive' => true ) ) ; if ( count ( $ users ) == 1 ) { $ returnValue = current ( $ users ) ; } else if ( count ( $ users ) > 1 ) { $ msg = "More than one user have the same login '${login}'." ; } return $ returnValue ; }
Get a specific Generis User from the persistent memory of Generis that
a specific login. If multiple users have the same login, a UserException
be thrown.

@access public
@author Jerome Bogaerts, <jerome@taotesting.com>
@param  string login A Generis User login.
@param  Class class A specific sub Class of User where in the User has to be searched in.
@return core_kernel_classes_Resource
Get a specific Generis User from the persistent memory of Generis that a specific login . If multiple users have the same login a UserException be thrown .