User registrations work fine, but when I'm trying to create a user through admin interface,
fill out the form and click "Register", I get redirected to "user/list" page, user doesn't get created, and the text on the top of the page is actually from "create user":

"This web page allows administrators to register new users. Users' e-mail addresses and usernames must be unique"

Comments

pflame’s picture

If the registration form submit button value not equal to Create New User, the user registration form does not work. I think it is a kind of bug in the user module. The callback for both admin user add form and users list is same. This is restricting the developers to change this form submit button value.

Nitesh Singh’s picture

Same problem here even i am not able to create new user from the admin menu(admin/user/user/create)...is there any solution for that
Need help...

Thanks
Nitesh Singh

Nitesh Singh’s picture

Version: 6.15 » 6.19

same problem User registrations work fine, but when I'm trying to create a user through admin interface,
fill out the form and click "Register", I get redirected to "user/list" page, user doesn't get created, and the text on the top of the page is actually from "create user":
When i fill Username: *, E-mail address: *, Password: *, Confirm password: * and when i click on create new account the page is redirected to user list page but the account is not created and the URL is like this (admin/user/user/create) with this statement......need help

"This web page allows administrators to register new users. Users' e-mail addresses and usernames must be unique"

pflame’s picture

Nitesh Singh,

Did you change the registration form submit button value from "Create New User" to "Register" using hook_form_alter? The submit button value should be "Create New User" otherwise it does not create user.

narendragupta’s picture

I am facing the same problem.
is there anybody know the solution.
thanx in advance

Nitesh Singh’s picture

did you change something in core user module? If yes please undo changes what ever you did than it will work fine or may be you can also replace your user module with new folder of user module of your drupal version.

narendragupta’s picture

Version: 6.19 » 5.15

Priority => critical
i undo the changes in user module.
still nt able to create new user.

Nitesh Singh’s picture

may be you can replace the new user module (6.19)with the old version.

narendragupta’s picture

no nitesh
actually there are so many custom fields on the same form having validation.
and i m also using bio module for the same.
may b due to that admin is restricted me to do so..

pflame’s picture

I got the same problem when I change the submit button value from "Create new user" to other name. If I keep the default value of the submit button then the problem solved.

dpearcefl’s picture

Status: Active » Closed (won't fix)

Considering the lack of activity on this issue and that Drupal v5 is no longer supported by for fixes or patches, I am going to close this ticket.

lmeurs’s picture

Status: Closed (fixed) » Active

I am experiencing the exact same thing, but with Drupal v7.12. With a totally clean install and only 1 exta module enabled which contains the next code:

function testmodule_form_alter(&$form, &$form_state, $form_id) {
  $form['actions']['submit']['#value'] = 'Test value';
}

When working with a non English website, the value needs to be the exact translation (ie. 'Nieuw account aanmaken' in Dutch), the English version 'Create new account' will not work.

EDIT: Problem seems to lay in modules/user/user.admin.inc where user_admin() checks the value of op.

/**
 * @file
 * Admin page callback file for the user module.
 */

function user_admin($callback_arg = '') {
  $op = isset($_POST['op']) ? $_POST['op'] : $callback_arg;

  switch ($op) {
    case t('Create new account'):
    case 'create':
      $build['user_register'] = drupal_get_form('user_register_form');
      break;
    default:
      if (!empty($_POST['accounts']) && isset($_POST['operation']) && ($_POST['operation'] == 'cancel')) {
        $build['user_multiple_cancel_confirm'] = drupal_get_form('user_multiple_cancel_confirm');
      }
      else {
        $build['user_filter_form'] = drupal_get_form('user_filter_form');
        $build['user_admin_account'] = drupal_get_form('user_admin_account');
      }
  }
  return $build;
}

I tried:

function testmodule_form_alter(&$form, &$form_state, $form_id) {
  $form['actions']['submit']['#value'] = 'Test value';
  $form['actions']['submit']['#return_value'] = 'create';
}

but return values do not work on regular buttons...

webchick’s picture

Version: 5.15 » 7.12
Status: Closed (won't fix) » Closed (fixed)

Please ask in the forums about your issue. This is not a bug with Drupal core.

webchick’s picture

Status: Active » Closed (won't fix)

Oops; restoring previous status.

lmeurs’s picture

Ah, thank you for the info. I found more about this at http://drupal.org/node/1279688 and http://drupal.org/node/208790

goyalpankaj1988’s picture

in user.module change submit button value Create new account line number 2448 drupal 6