When the user logs in via FbConnect, the login hook is not called. To fix it, change the function fbconnect_autoconnect_form_validate() to make it look like this in the appropriate section:
elseif ($uid) {
$user = user_load($uid);
user_module_invoke('login', $edit, $user);
watchdog('user',
t('Session opened for %name (via FbConnect).',
array('%name' => $user->name))
);
db_query('UPDATE {users} SET login = %d WHERE uid = %d', time(), $user->uid);
// If the fbconnect_profile module is enabled,
// we checks the imported information's cache.
if (module_exists('fbconnect_profile')) {
fbconnect_profile_check_profile_cache($user->uid);
}
drupal_goto($_GET['q']);
}
It would be great if this could be added officially.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fbconnect.module.427334.d5.patch | 829 bytes | jaydub |
| #1 | fbconnect.module.427334.d6.patch | 830 bytes | jaydub |
Comments
Comment #1
jaydub commentedMoving this to 6.x since the code in question is in both.
The attached patches take the above idea and put into patch form. I added in a call to sess_regenerate() since that's what goes on in the user module on login.
Comment #2
LaNets commentedComment #3
LaNets commented