user_login_submit

Versions
4.7 – 5
user_login_submit($form_id, $form_values)
6 – 7
user_login_submit($form, &$form_state)

Submit handler for the login form. Redirects the user to a page.

The user is redirected to the My Account page. Setting the destination in the query string (as done by the user login block) overrides the redirect.

Code

modules/user/user.module, line 1400

<?php
function user_login_submit($form, &$form_state) {
  global $user;
  if ($user->uid) {
    $form_state['redirect'] = 'user/'. $user->uid;
    return;
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.