summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-05-29 13:02:14 +0000
committerDries Buytaert <dries@buytaert.net>2006-05-29 13:02:14 +0000
commit87dca6df9ab6da06134d7bb535e530512325cdae (patch)
tree8a2e93fe4652fbb321669aba17d5a13087a0856a /modules
parentcf3bfe006bd9fa5aedac03fe88cb3229df4dab3e (diff)
downloadbrdo-87dca6df9ab6da06134d7bb535e530512325cdae.tar.gz
brdo-87dca6df9ab6da06134d7bb535e530512325cdae.tar.bz2
- Patch #62855 by webchick: admin/user/create should redirect back to admin/user/create
Diffstat (limited to 'modules')
-rw-r--r--modules/user.module5
-rw-r--r--modules/user/user.module5
2 files changed, 4 insertions, 6 deletions
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.'));