function logintoboggan_process_login in LoginToboggan 7
Same name and namespace in other branches
- 8 logintoboggan.module \logintoboggan_process_login()
- 5 logintoboggan.module \logintoboggan_process_login()
- 6 logintoboggan.module \logintoboggan_process_login()
Actually log the user on
Parameters
object $account: The user object.
array $edit: An array of form values if a form has been submitted.
array $redirect: An array of key/value pairs describing a redirect location, in the form that drupal_goto() will understand. Defaults to: 'path' => 'user/'. $user->uid 'query' => NULL 'fragment' => NULL
2 calls to logintoboggan_process_login()
- logintoboggan_user_register_submit in ./
logintoboggan.module - Custom submit function for user registration form
- logintoboggan_validate_email in ./
logintoboggan.validation.inc - @file Validation functions for LoginToboggan module.
File
- ./
logintoboggan.module, line 1043 - LoginToboggan module
Code
function logintoboggan_process_login($account, &$edit, $redirect = array()) {
global $user;
$user = user_load($account->uid);
user_login_finalize($edit);
// In the special case where a user is validating but they did not create their
// own password, show a user message letting them know to change their password.
if (variable_get('user_email_verification', TRUE)) {
watchdog('user', 'User %name used one-time login link at time %timestamp.', array(
'%name' => $user->name,
'%timestamp' => REQUEST_TIME,
));
drupal_set_message(t('You have just used your one-time login link. It is no longer possible to use this link to login. Please change your password.'));
}
if (isset($redirect[0]) && $redirect[0] != '') {
return $redirect;
}
return array(
'user/' . $user->uid,
array(
'query' => array(),
'fragment' => '',
),
);
}