public static function setLastVisitedUrl($url){
	    if(empty($url)){
	        throw new common_Exception('Cannot register an empty URL for the last visited extension');
	    }
        $success = false;
	    
	    $userUri = common_session_SessionManager::getSession()->getUserUri();
	    if (!empty($userUri)) {
	        $user = new \core_kernel_classes_Resource($userUri);
    	    $user = new core_kernel_classes_Resource($userUri);
    	    if ($user->exists()) {
    	        // user in ontology
    	        
    	        //clean up what's stored
    	        $url = str_replace(ROOT_URL, '', $url);
    	        $success = $user->editPropertyValues(new core_kernel_classes_Property(TaoOntology::PROPERTY_USER_LAST_EXTENSION), $url);
    	    } // else we fail;
	    }
	    return $success;
	}
public static function setLastVisitedUrl($url){
	    if(empty($url)){
	        throw new common_Exception('Cannot register an empty URL for the last visited extension');
	    }
        $success = false;
	    
	    $userUri = common_session_SessionManager::getSession()->getUserUri();
	    if (!empty($userUri)) {
	        $user = new \core_kernel_classes_Resource($userUri);
    	    $user = new core_kernel_classes_Resource($userUri);
    	    if ($user->exists()) {
    	        // user in ontology
    	        
    	        //clean up what's stored
    	        $url = str_replace(ROOT_URL, '', $url);
    	        $success = $user->editPropertyValues(new core_kernel_classes_Property(TaoOntology::PROPERTY_USER_LAST_EXTENSION), $url);
    	    } // else we fail;
	    }
	    return $success;
	}
public static function setLastVisitedUrl ( $ url ) { if ( empty ( $ url ) ) { throw new common_Exception ( 'Cannot register an empty URL for the last visited extension' ) ; } $ success = false ; $ userUri = common_session_SessionManager :: getSession ( ) -> getUserUri ( ) ; if ( ! empty ( $ userUri ) ) { $ user = new \ core_kernel_classes_Resource ( $ userUri ) ; $ user = new core_kernel_classes_Resource ( $ userUri ) ; if ( $ user -> exists ( ) ) { // user in ontology //clean up what's stored $ url = str_replace ( ROOT_URL , '' , $ url ) ; $ success = $ user -> editPropertyValues ( new core_kernel_classes_Property ( TaoOntology :: PROPERTY_USER_LAST_EXTENSION ) , $ url ) ; } // else we fail; } return $ success ; }
Set the URL of the last visited extension to a user.
@param string $url a non empty URL where the user was the last time
@param core_kernel_classes_Resource $user a user or the current user if null/not set (optional)
@throws common_Exception
Set the URL of the last visited extension to a user .