0

For usability of the system when a admin role creates a new user. The admin wants to edit user details but to do this he/she now needs to go to the user and click on "Edit" first.

Is there a way to redirect to this created user's "Edit" page immediately after creating that user?

Thanks in advance!

0

You can use form alter and redirect to any page you want

function custom_form_alter(&$form, &$form_state,$form_id) {
  switch ($form_id) {
    case 'user_register_form':
          $form['#submit'][] = 'custom_user_register_submit';
      break;
  }
}

function custom_user_register_submit($form, &$form_state) {
  $uid = $form['#user']->uid;
  $form_state['redirect'] = 'user/'.$uid.'/edit';
}
0

Try to use Login Destination module. This may solve your query.

Or you can do this by using Rules module.

  • Isn't that only for users who login? I want that the admin get's redirected after he (the admin) creates a new user and the admin can edit that user – user3428971 Feb 12 '15 at 8:52
  • If admin can register the user, then why admin need to goto again there edit profile page. He can fill full profile at the time of registration. – Nishant Feb 12 '15 at 8:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.