mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-26 16:18:47 +00:00
25 lines
663 B
PHP
25 lines
663 B
PHP
<?php
|
|
/*************************************
|
|
* SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
************************************/
|
|
|
|
function vtws_logout($sessionId,$user){
|
|
$sessionManager = new SessionManager();
|
|
$sid = $sessionManager->startSession($sessionId);
|
|
|
|
if(!isset($sessionId) || !$sessionManager->isValid()){
|
|
return $sessionManager->getError();
|
|
}
|
|
|
|
// crmv@91082
|
|
$loghistory = LoginHistory::getInstance();
|
|
$loghistory->user_logout($user->user_name);
|
|
// crmv@91082e
|
|
|
|
$sessionManager->destroy();
|
|
// $sessionManager->setExpire(1);
|
|
return array("message"=>"successfull");
|
|
|
|
}
|
|
?>
|