mirror of
https://github.com/VTECRM/vtenext.git
synced 2026-02-26 16:18:47 +00:00
29 lines
728 B
PHP
29 lines
728 B
PHP
<?php
|
|
/*************************************
|
|
* SPDX-FileCopyrightText: 2009-2020 Vtenext S.r.l. <info@vtenext.com>
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
************************************/
|
|
|
|
class TouchShareToken extends TouchWSClass {
|
|
|
|
function process(&$request) {
|
|
|
|
$CRMVUtils = CRMVUtils::getInstance();
|
|
$CRMVUtils->shareTokenDuration = 30; // 30 seconds
|
|
|
|
$module = $request['module'];
|
|
$recordid = $request['recordid'];
|
|
|
|
if ($module == 'Messages' && isset($request['contentid'])) {
|
|
$contentid = intval($request['contentid']);
|
|
$params = array('contentid'=>$contentid);
|
|
}
|
|
|
|
$token = $CRMVUtils->generateShareToken($module, $recordid, false, $params);
|
|
|
|
return array('token' => $token );
|
|
}
|
|
|
|
}
|
|
|
|
?>
|