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

		if (empty($login)){
			throw new common_exception_InvalidArgumentType('Missing login for '.__FUNCTION__);
		}
			
		$class = (!empty($class)) ? $class : $this->getRootClass();
		
		$user = $this->generisUserService->getOneUser($login, $class);
		
		if (!empty($user)){
			
			$userRolesProperty = new core_kernel_classes_Property(GenerisRdf::PROPERTY_USER_ROLES);
			$userRoles = $user->getPropertyValuesCollection($userRolesProperty);
			$allowedRoles = $this->getAllowedRoles();
			
			if($this->generisUserService->userHasRoles($user, $allowedRoles)){
				$returnValue = $user;
			} else {
			    common_Logger::i('User found for login \''.$login.'\' but does not have matchign roles');
			}
		} else {
			common_Logger::i('No user found for login \''.$login.'\'');
		}

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

		if (empty($login)){
			throw new common_exception_InvalidArgumentType('Missing login for '.__FUNCTION__);
		}
			
		$class = (!empty($class)) ? $class : $this->getRootClass();
		
		$user = $this->generisUserService->getOneUser($login, $class);
		
		if (!empty($user)){
			
			$userRolesProperty = new core_kernel_classes_Property(GenerisRdf::PROPERTY_USER_ROLES);
			$userRoles = $user->getPropertyValuesCollection($userRolesProperty);
			$allowedRoles = $this->getAllowedRoles();
			
			if($this->generisUserService->userHasRoles($user, $allowedRoles)){
				$returnValue = $user;
			} else {
			    common_Logger::i('User found for login \''.$login.'\' but does not have matchign roles');
			}
		} else {
			common_Logger::i('No user found for login \''.$login.'\'');
		}

        return $returnValue;
    }
public function getOneUser ( $ login , core_kernel_classes_Class $ class = null ) { $ returnValue = null ; if ( empty ( $ login ) ) { throw new common_exception_InvalidArgumentType ( 'Missing login for ' . __FUNCTION__ ) ; } $ class = ( ! empty ( $ class ) ) ? $ class : $ this -> getRootClass ( ) ; $ user = $ this -> generisUserService -> getOneUser ( $ login , $ class ) ; if ( ! empty ( $ user ) ) { $ userRolesProperty = new core_kernel_classes_Property ( GenerisRdf :: PROPERTY_USER_ROLES ) ; $ userRoles = $ user -> getPropertyValuesCollection ( $ userRolesProperty ) ; $ allowedRoles = $ this -> getAllowedRoles ( ) ; if ( $ this -> generisUserService -> userHasRoles ( $ user , $ allowedRoles ) ) { $ returnValue = $ user ; } else { common_Logger :: i ( 'User found for login \'' . $ login . '\' but does not have matchign roles' ) ; } } else { common_Logger :: i ( 'No user found for login \'' . $ login . '\'' ) ; } return $ returnValue ; }
Get a user that has a given login.

@access public
@author Jerome Bogaerts, <jerome@taotesting.com>
@param string login the user login is the unique identifier to retrieve him.
@param core_kernel_classes_Class A specific class to search the user.
@return core_kernel_classes_Resource
Get a user that has a given login .