Closes #138 Fix notification settings when saving
This commit is contained in:
parent
5c28c07c76
commit
9e116d1172
@ -835,11 +835,25 @@ function hesk_validateUserInfo($pass_required = 1, $redirect_to = './manage_user
|
||||
/* Any errors */
|
||||
if (strlen($hesk_error_buffer))
|
||||
{
|
||||
$hesk_error_buffer = $hesklang['rfm'].'<br /><br /><ul>'.$hesk_error_buffer.'</ul>';
|
||||
hesk_process_messages($hesk_error_buffer,$redirect_to);
|
||||
if ($myuser['isadmin'])
|
||||
{
|
||||
// Preserve default staff data for the form
|
||||
global $default_userdata;
|
||||
$_SESSION['userdata']['features'] = $default_userdata['features'];
|
||||
$_SESSION['userdata']['categories'] = $default_userdata['categories'];
|
||||
}
|
||||
|
||||
$hesk_error_buffer = $hesklang['rfm'].'<br /><br /><ul>'.$hesk_error_buffer.'</ul>';
|
||||
hesk_process_messages($hesk_error_buffer,$redirect_to);
|
||||
}
|
||||
|
||||
return $myuser;
|
||||
// "can_unban_emails" feature also enables "can_ban_emails"
|
||||
if ( in_array('can_unban_emails', $myuser['features']) && ! in_array('can_ban_emails', $myuser['features']) )
|
||||
{
|
||||
$myuser['features'][] = 'can_ban_emails';
|
||||
}
|
||||
|
||||
return $myuser;
|
||||
|
||||
} // End hesk_validateUserInfo()
|
||||
|
||||
|
@ -349,7 +349,9 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
<?php
|
||||
if ($action == 'profile_page')
|
||||
{ ?>
|
||||
<input type="submit" class="btn btn-default" value="<?php echo $hesklang['update_profile']; ?>" />
|
||||
<input type="hidden" name="action" value="update">
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>">
|
||||
<input type="submit" class="btn btn-default" value="<?php echo $hesklang['update_profile']; ?>">
|
||||
<?php
|
||||
} elseif ($action == 'create_user')
|
||||
{ ?>
|
||||
@ -363,6 +365,7 @@ function hesk_profile_tab($session_array='new',$is_profile_page=true,$action='pr
|
||||
<input type="hidden" name="a" value="save" />
|
||||
<input type="hidden" name="userid" value="<?php echo intval( hesk_GET('id') ); ?>" />
|
||||
<input type="hidden" name="token" value="<?php hesk_token_echo(); ?>" />
|
||||
<input type="hidden" name="active" value="<?php echo $_SESSION[$session_array]['active']; ?>">
|
||||
<input class="btn btn-default" type="submit" value="<?php echo $hesklang['save_changes']; ?>" />
|
||||
<a class="btn btn-danger" href="manage_users.php"><?php echo $hesklang['dich']; ?></a>
|
||||
<?php
|
||||
|
Loading…
x
Reference in New Issue
Block a user