本文整理匯總了PHP中Users_Record_Model::deleteUserPermanently方法的典型用法代碼示例。如果您正苦於以下問題:PHP Users_Record_Model::deleteUserPermanently方法的具體用法?PHP Users_Record_Model::deleteUserPermanently怎麽用?PHP Users_Record_Model::deleteUserPermanently使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Users_Record_Model
的用法示例。
在下文中一共展示了Users_Record_Model::deleteUserPermanently方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: process
public function process(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$ownerId = $request->get('userid');
$newOwnerId = $request->get('transfer_user_id');
if ($request->get('mode') == 'permanent') {
Users_Record_Model::deleteUserPermanently($ownerId, $newOwnerId);
} else {
$userId = vtws_getWebserviceEntityId($moduleName, $ownerId);
$transformUserId = vtws_getWebserviceEntityId($moduleName, $newOwnerId);
$userModel = Users_Record_Model::getCurrentUserModel();
vtws_deleteUser($userId, $transformUserId, $userModel);
if ($request->get('permanent') == '1') {
Users_Record_Model::deleteUserPermanently($ownerId, $newOwnerId);
}
}
$response = new Vtiger_Response();
$response->setResult(array('message' => vtranslate('LBL_USER_DELETED_SUCCESSFULLY', $moduleName)));
$response->emit();
}