function system_perform_user_login

7.x system.module system_perform_user_login($user_id)
6.x system.module system_perform_user_login($user_id)

Actually performs the logging in of a user with user_id.

2 calls to system_perform_user_login()
system_login_form_submit in modules/system/system.module
Submit handler for login form. If we are here, it probably means we have indeed authenticated. Just in case, we will test the form_state["passed_authentication"] value, which we expect to have been set in our validate handler.
system_mfa_login_form_submit in modules/system/system.module

File

modules/system/system.module, line 3627

Code

function system_perform_user_login($user_id) {

  $_SESSION ["fp_logged_in"] = TRUE;


  // Set up a new $account object.
  $account = new stdClass();

  $account = fp_load_user($user_id);

  // Set the $account to the SESSION.
  $_SESSION ["fp_user_object"] = $account;


  db_query("UPDATE users SET last_login = ? WHERE user_id = ?", array(time(), $user_id));

  return $account;

}