Commit 8dcb5ab9 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#182528 by RobRoy: move drupal_set_message() out of user deletion API function to UI function

parent 47137a63
......@@ -1410,7 +1410,6 @@ function user_delete($edit, $uid) {
db_query('DELETE FROM {authmap} WHERE uid = %d', $uid);
$variables = array('%name' => $account->name, '%email' => '<'. $account->mail .'>');
watchdog('user', 'Deleted user: %name %email.', $variables, WATCHDOG_NOTICE);
drupal_set_message(t('%name has been deleted.', $variables));
module_invoke_all('user', 'delete', $edit, $account);
}
......
......@@ -320,6 +320,8 @@ function user_confirm_delete(&$form_state, $account) {
*/
function user_confirm_delete_submit($form, &$form_state) {
user_delete($form_state['values'], $form_state['values']['_account']->uid);
drupal_set_message(t('%name has been deleted.', array('%name' => $form_state['values']['_account']->name)));
if (!isset($_REQUEST['destination'])) {
$form_state['redirect'] = 'admin/user/user';
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment