diff --git a/admin/manage_users.php b/admin/manage_users.php
index 910511cf..f1a22b8b 100644
--- a/admin/manage_users.php
+++ b/admin/manage_users.php
@@ -735,7 +735,7 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
$myuser['email'] = hesk_validateEmail( hesk_POST('email'), 'ERR', 0) or $hesk_error_buffer .= '
' . $hesklang['enter_valid_email'] . '';
$myuser['user'] = hesk_input( hesk_POST('user') ) or $hesk_error_buffer .= '' . $hesklang['enter_username'] . '';
$myuser['isadmin'] = hesk_POST('template') == '1' ? 1 : 0;
- $myuser['template'] = hesk_POST('template') != 'N' ? hesk_POST('template') : -1;
+ $myuser['template'] = hesk_POST('template');
$myuser['signature'] = hesk_input( hesk_POST('signature') );
$myuser['autoassign'] = hesk_POST('autoassign') == 'Y' ? 1 : 0;
$myuser['active'] = empty($_POST['active']) ? 0 : 1;
diff --git a/inc/profile_functions.inc.php b/inc/profile_functions.inc.php
index 49ac4926..b7681fc8 100644
--- a/inc/profile_functions.inc.php
+++ b/inc/profile_functions.inc.php
@@ -150,7 +150,8 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
$selected = $_SESSION[$session_array]['permission_template'] == $row['id'] ? 'selected' : '';
echo '';
}
- echo '';
+ $selected = $_SESSION[$session_array]['permission_template'] == '-1' ? 'selected' : '';
+ echo '';
echo '';
outputCheckboxJavascript();
?>
@@ -436,7 +437,7 @@ function outputCheckboxJavascript() {
});
}
function setTemplateToCustom() {
- $('#permission-tpl').val('N');
+ $('#permission-tpl').val('-1');
}
";
}
\ No newline at end of file