function user_login_form_submit

Submit handler for the login form. Load $user object and perform standard login tasks. The user is then redirected to the My Account page. Setting the destination in the query string overrides the redirect.

3 calls to user_login_form_submit()
openid_authentication in drupal/core/modules/openid/openid.module
Authenticate a user or attempt registration.
RegisterFormController::save in drupal/core/modules/user/lib/Drupal/user/RegisterFormController.php
Overrides Drupal\Core\Entity\EntityFormController::submit().
user_external_login_register in drupal/core/modules/user/user.module
Helper function for authentication modules. Either logs in or registers the current user, based on username. Either way, the global $user object is populated and login tasks are performed.

File

drupal/core/modules/user/user.module, line 1673
Enables the user registration and login system.

Code

function user_login_form_submit($form, &$form_state) {
  global $user;
  $user = user_load($form_state['uid']);
  $form_state['redirect'] = 'user/' . $user->uid;
  user_login_finalize($form_state);
}