I am having a problem trying to get the user to redirect to their profile page (user/uid) after they update their profile (user/uid/edit), I don't want them to remain on the page they just edited. I have looked high and low on drupal answers, google, and the documentation I can't get this to work.
Here is the code;
function form_redirect_form_alter(&$form, &$form_state, $form_id) {
global $user;
switch ($form_id) {
case 'uprofile_node_form':
$form_state['redirect'] = 'user/'.$user->uid;
break;
}
}
I have tried everything including a submit_handler and that doesn't work. I have tried including the base_url - doesn't work either. What am I overlooking. I figure that this should work.
I read somewhere online that redirects will not work if $form_state['storage']['values'] is not empty. If this is the problem, how would I overcome it?
Thanks.