From 87dca6df9ab6da06134d7bb535e530512325cdae Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 29 May 2006 13:02:14 +0000 Subject: - Patch #62855 by webchick: admin/user/create should redirect back to admin/user/create --- modules/user.module | 5 ++--- modules/user/user.module | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'modules') diff --git a/modules/user.module b/modules/user.module index b6098f00f..9e03bcee4 100644 --- a/modules/user.module +++ b/modules/user.module @@ -1191,6 +1191,8 @@ function user_register() { '#type' => 'checkbox', '#title' => t('Notify user of new account') ); + // Redirect back to page which initiated the create request; usually admin/user/create + $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']); } $extra = _user_forms($null, $null, $null, 'register'); @@ -1249,8 +1251,6 @@ function user_register_submit($form_id, $form_values) { else { if ($admin && !$notify) { drupal_set_message(t('Created a new user account. No e-mail has been sent.')); - - return 'admin/user'; } else if ($account->status || $notify) { // Create new user account, no administrator approval required. @@ -1261,7 +1261,6 @@ function user_register_submit($form_id, $form_values) { if ($notify) { drupal_set_message(t('Password and further instructions have been e-mailed to the new user %user.', array('%user' => theme('placeholder', $name)))); - return 'admin/user'; } else { drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.')); diff --git a/modules/user/user.module b/modules/user/user.module index b6098f00f..9e03bcee4 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1191,6 +1191,8 @@ function user_register() { '#type' => 'checkbox', '#title' => t('Notify user of new account') ); + // Redirect back to page which initiated the create request; usually admin/user/create + $form['destination'] = array('#type' => 'hidden', '#value' => $_GET['q']); } $extra = _user_forms($null, $null, $null, 'register'); @@ -1249,8 +1251,6 @@ function user_register_submit($form_id, $form_values) { else { if ($admin && !$notify) { drupal_set_message(t('Created a new user account. No e-mail has been sent.')); - - return 'admin/user'; } else if ($account->status || $notify) { // Create new user account, no administrator approval required. @@ -1261,7 +1261,6 @@ function user_register_submit($form_id, $form_values) { if ($notify) { drupal_set_message(t('Password and further instructions have been e-mailed to the new user %user.', array('%user' => theme('placeholder', $name)))); - return 'admin/user'; } else { drupal_set_message(t('Your password and further instructions have been sent to your e-mail address.')); -- cgit v1.2.3