I added a custom submit function to the user registration form. I want to be able to redirect to the user profile edit. How can I get the uid of the record that is about to be created? global $user doesn't work:
function my_user_register_submit ($form, &$form_state) {
global $user;
$form_state['redirect'] = 'user/' . $user->uid . '/edit?registration=1&destination=blahblah';
}
Edit:
My use case is this: after registration I want to redirect the user to the "edit profile" page to complete the remaining profile fields. When they "skip" that or complete the form they go to their profile page. However, when a ?destination parameter is passed into the register form I want to carry that value to the "edit profile" page and then direct the user to that destination page when they are done.
$account->uid
;