<?php include '../../../inc/includes.php'; if (isset($_POST['update'])) { $userpref = new PluginTalkUserpref(); $userpref->update($_POST); if ($_POST['users_id'] === Session::getLoginUserID()) { PluginTalkUserpref::loadInSession(); } } Html::back();
static function changeProfile() { $prof = new self(); if ($prof->getFromDBByProfile($_SESSION['glpiactiveprofile']['id'])) { //get User preferences PluginTalkUserpref::loadInSession(); // re-load profile in session (removed in self-service by Session::cleanProfile) $_SESSION['glpiactiveprofile']['plugin_talk_is_active'] = $prof->fields['rights']; } }