Skip to content

Instantly share code, notes, and snippets.

@mrryanjohnston
Created October 4, 2011 11:52
Show Gist options
  • Save mrryanjohnston/1261450 to your computer and use it in GitHub Desktop.
Save mrryanjohnston/1261450 to your computer and use it in GitHub Desktop.
if (module_load_include('inc', 'ldap_authentication')) {
$form_state['values']['name'] = $username;
$form_state['values']['pass'] = $password;
$uid = _ldap_authentication_user_login_authenticate_validate($form_state)->uid;
}
if (!isset($uid)) {
$uid = user_authenticate($username, $password);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment