function bakery_user_external_login

cis7 bakery.module bakery_user_external_login($account, $edit = array())
cle7 bakery.module bakery_user_external_login($account, $edit = array())
elmsmedia7 bakery.module bakery_user_external_login($account, $edit = array())
icor7 bakery.module bakery_user_external_login($account, $edit = array())
meedjum_blog7 bakery.module bakery_user_external_login($account, $edit = array())
mooc7 bakery.module bakery_user_external_login($account, $edit = array())

Perform standard Drupal login operations for a user object.

The user object must already be authenticated. This function verifies that the user account is not blocked/denied and then performs the login, updates the login timestamp in the database, invokes hook_user('login'), and regenerates the session.

Parameters

$account: An authenticated user object to be set as the currently logged in user.

$edit: The array of form values submitted by the user, if any. This array is passed to hook_user op login.

Return value

boolean TRUE if the login succeeds, FALSE otherwise.

2 calls to bakery_user_external_login()
bakery_register in sites/all/modules/ulmus/bakery/bakery.module
Special Bakery register callback registers the user and returns to slave.
_bakery_taste_chocolatechip_cookie in sites/all/modules/ulmus/bakery/bakery.module
Test identification cookie

File

sites/all/modules/ulmus/bakery/bakery.module, line 1569

Code

function bakery_user_external_login($account, $edit = array()) {
  $form = drupal_get_form('user_login');

  $state['values'] = $edit;
  if (empty($state['values']['name'])) {
    $state['values']['name'] = $account->name;
  }

  // Check if user is blocked or denied by access rules.
  user_login_name_validate($form, $state, (array) $account);
  if (form_get_errors()) {
    // Invalid login.
    return FALSE;
  }

  // Valid login.
  global $user;
  $user = $account;
  bakery_user_authenticate_finalize($state['values']);
  return TRUE;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.