Commit 87dca6df authored by Dries's avatar Dries

- Patch #62855 by webchick: admin/user/create should redirect back to admin/user/create

parent cf3bfe00
......@@ -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.'));
......
......@@ -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.'));
......
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