public function addUser($login, $password, core_kernel_classes_Resource $role = null, core_kernel_classes_Class $class = null){

        $this->checkCurrentUserAccess($role);
    	if (empty($class)){
    		$class = $this->getRootClass();
    	}
    	
        $user = $this->generisUserService->addUser($login, $password, $role, $class);
        
        //set up default properties
        if(!is_null($user)){
            $user->setPropertyValue(new core_kernel_classes_Property(TaoOntology::PROPERTY_USER_FIRST_TIME), GenerisRdf::GENERIS_TRUE);
        }
    	
        return $user;
    }
public function addUser($login, $password, core_kernel_classes_Resource $role = null, core_kernel_classes_Class $class = null){

        $this->checkCurrentUserAccess($role);
    	if (empty($class)){
    		$class = $this->getRootClass();
    	}
    	
        $user = $this->generisUserService->addUser($login, $password, $role, $class);
        
        //set up default properties
        if(!is_null($user)){
            $user->setPropertyValue(new core_kernel_classes_Property(TaoOntology::PROPERTY_USER_FIRST_TIME), GenerisRdf::GENERIS_TRUE);
        }
    	
        return $user;
    }
public function addUser ( $ login , $ password , core_kernel_classes_Resource $ role = null , core_kernel_classes_Class $ class = null ) { $ this -> checkCurrentUserAccess ( $ role ) ; if ( empty ( $ class ) ) { $ class = $ this -> getRootClass ( ) ; } $ user = $ this -> generisUserService -> addUser ( $ login , $ password , $ role , $ class ) ; //set up default properties
 if ( ! is_null ( $ user ) ) { $ user -> setPropertyValue ( new core_kernel_classes_Property ( TaoOntology :: PROPERTY_USER_FIRST_TIME ) , GenerisRdf :: GENERIS_TRUE ) ; } return $ user ; }
Add a new user.

@param string login The login to give the user.
@param string password the password in clear.
@param core_kernel_classes_Resource role A role to grant to the user.
@param core_kernel_classes_Class A specific class to use to instantiate the new user. If not specified, the class returned by the getUserClass method is used.
@return core_kernel_classes_Resource the new user
@throws core_kernel_users_Exception If an error occurs.
Add a new user .