User can login only once, after that login fails

kaakuu - August 30, 2009 - 07:12
Project:Site Network
Version:6.x-1.01
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:bug fix, login, site_network
Description

After setting up two sites so that user from site A can log into site B things work OK for the first time only. Example : user mary@ab.com can log in to xyz.com ONCE, after that on logging out and attempt to re-login fails with error message internal server error.

#1

walkero - September 30, 2009 - 14:40

There is a problem with the function "drupal_get_form" which resides in "user_external_login". The information of the login form can't reach this function, so the login hangs. A fast fix of this problem is to change the following in the "site_network.authentication.inc" file:

52:        if (isset($account->uid)) {
53:             //user_external_login($account);

and after that add the following code

// 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;
user_authenticate_finalize($state['values']);

 
 

Drupal is a registered trademark of Dries Buytaert.