|
|
@ -86,6 +86,7 @@ $default_userdata = array(
|
|
|
|
'notify_customer_new' => 1,
|
|
|
|
'notify_customer_new' => 1,
|
|
|
|
'notify_customer_reply' => 1,
|
|
|
|
'notify_customer_reply' => 1,
|
|
|
|
'show_suggested' => 1,
|
|
|
|
'show_suggested' => 1,
|
|
|
|
|
|
|
|
'autoreload' => 0,
|
|
|
|
'default_calendar_view' => $default_view,
|
|
|
|
'default_calendar_view' => $default_view,
|
|
|
|
|
|
|
|
|
|
|
|
// Notifications
|
|
|
|
// Notifications
|
|
|
@ -521,6 +522,7 @@ function new_user()
|
|
|
|
`heskprivileges`,
|
|
|
|
`heskprivileges`,
|
|
|
|
`afterreply`,
|
|
|
|
`afterreply`,
|
|
|
|
`autostart`,
|
|
|
|
`autostart`,
|
|
|
|
|
|
|
|
`autoreload`,
|
|
|
|
`notify_customer_new`,
|
|
|
|
`notify_customer_new`,
|
|
|
|
`notify_customer_reply`,
|
|
|
|
`notify_customer_reply`,
|
|
|
|
`show_suggested`,
|
|
|
|
`show_suggested`,
|
|
|
@ -547,6 +549,7 @@ function new_user()
|
|
|
|
'" . hesk_dbEscape($myuser['features']) . "',
|
|
|
|
'" . hesk_dbEscape($myuser['features']) . "',
|
|
|
|
'" . ($myuser['afterreply']) . "' ,
|
|
|
|
'" . ($myuser['afterreply']) . "' ,
|
|
|
|
'" . ($myuser['autostart']) . "' ,
|
|
|
|
'" . ($myuser['autostart']) . "' ,
|
|
|
|
|
|
|
|
'" . ($myuser['autoreload']) . "' ,
|
|
|
|
'" . ($myuser['notify_customer_new']) . "' ,
|
|
|
|
'" . ($myuser['notify_customer_new']) . "' ,
|
|
|
|
'" . ($myuser['notify_customer_reply']) . "' ,
|
|
|
|
'" . ($myuser['notify_customer_reply']) . "' ,
|
|
|
|
'" . ($myuser['show_suggested']) . "' ,
|
|
|
|
'" . ($myuser['show_suggested']) . "' ,
|
|
|
@ -673,6 +676,7 @@ function update_user()
|
|
|
|
`heskprivileges`='" . hesk_dbEscape($myuser['features']) . "',
|
|
|
|
`heskprivileges`='" . hesk_dbEscape($myuser['features']) . "',
|
|
|
|
`afterreply`='" . ($myuser['afterreply']) . "' ,
|
|
|
|
`afterreply`='" . ($myuser['afterreply']) . "' ,
|
|
|
|
`autostart`='" . ($myuser['autostart']) . "' ,
|
|
|
|
`autostart`='" . ($myuser['autostart']) . "' ,
|
|
|
|
|
|
|
|
`autoreload`='" . ($myuser['autoreload']) . "' ,
|
|
|
|
`notify_customer_new`='" . ($myuser['notify_customer_new']) . "' ,
|
|
|
|
`notify_customer_new`='" . ($myuser['notify_customer_new']) . "' ,
|
|
|
|
`notify_customer_reply`='" . ($myuser['notify_customer_reply']) . "' ,
|
|
|
|
`notify_customer_reply`='" . ($myuser['notify_customer_reply']) . "' ,
|
|
|
|
`show_suggested`='" . ($myuser['show_suggested']) . "' ,
|
|
|
|
`show_suggested`='" . ($myuser['show_suggested']) . "' ,
|
|
|
@ -688,7 +692,7 @@ function update_user()
|
|
|
|
`autorefresh`=" . intval($myuser['autorefresh']) . ",
|
|
|
|
`autorefresh`=" . intval($myuser['autorefresh']) . ",
|
|
|
|
`permission_template`=" . intval($myuser['template']) . ",
|
|
|
|
`permission_template`=" . intval($myuser['template']) . ",
|
|
|
|
`default_calendar_view`=" . intval($myuser['default_calendar_view']) . "
|
|
|
|
`default_calendar_view`=" . intval($myuser['default_calendar_view']) . "
|
|
|
|
WHERE `id`='" . intval($myuser['id']) . "' LIMIT 1");
|
|
|
|
WHERE `id`='" . intval($myuser['id']) . "'");
|
|
|
|
|
|
|
|
|
|
|
|
// If they are now inactive, remove any manager rights
|
|
|
|
// If they are now inactive, remove any manager rights
|
|
|
|
if (!$myuser['active']) {
|
|
|
|
if (!$myuser['active']) {
|
|
|
@ -788,6 +792,19 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
|
|
|
|
$myuser['notify_customer_new'] = isset($_POST['notify_customer_new']) ? 1 : 0;
|
|
|
|
$myuser['notify_customer_new'] = isset($_POST['notify_customer_new']) ? 1 : 0;
|
|
|
|
$myuser['notify_customer_reply'] = isset($_POST['notify_customer_reply']) ? 1 : 0;
|
|
|
|
$myuser['notify_customer_reply'] = isset($_POST['notify_customer_reply']) ? 1 : 0;
|
|
|
|
$myuser['show_suggested'] = isset($_POST['show_suggested']) ? 1 : 0;
|
|
|
|
$myuser['show_suggested'] = isset($_POST['show_suggested']) ? 1 : 0;
|
|
|
|
|
|
|
|
$myuser['autoreload'] = isset($_POST['autoreload']) ? 1 : 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($myuser['autoreload']) {
|
|
|
|
|
|
|
|
$myuser['autoreload'] = intval(hesk_POST('reload_time'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (hesk_POST('secmin') == 'min') {
|
|
|
|
|
|
|
|
$myuser['autoreload'] *= 60;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($myuser['autoreload'] < 0 || $myuser['autoreload'] > 65535) {
|
|
|
|
|
|
|
|
$myuser['autoreload'] = 30;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
$myuser['default_calendar_view'] = hesk_POST('default-calendar-view', 0);
|
|
|
|
$myuser['default_calendar_view'] = hesk_POST('default-calendar-view', 0);
|
|
|
|
|
|
|
|
|
|
|
|
/* Notifications */
|
|
|
|
/* Notifications */
|
|
|
|