We have a setup that authenticates users with the ldap_integration module and it appears that gallery can't deal with the external authentication.
The very first time someone logs into the site if they go to the main gallery page (/gallery) they get an access denied message. Logging out and logging back in seems to solve the problem. Oddly, all other gallery pages work just fine.
I've been able to pin the issue down to this bit of code in gallery_user.inc:
case GALLERY_MAP_USER_EXISTS:
// Update user (Drupal -> G2)
$ret = GalleryEmbed::updateUser($user->uid,
array('username' => $user->name,
'fullname' => $fullname,
'email' => $user->mail,
'language' => gallery_get_language($user),
'hashedpassword' => $pass,
'hashmethod' => 'md5'));
if ($ret) {
gallery_error(t('Error updating Gallery user'), $ret);
return FALSE;
}
break;
This also errors when the User Sync script is run, meaning that the two user tables are never in sync.
As far as I can tell this has to do with ldap_integration not storing a real password in the database and instead relying on the ldap server for authentication.
Is there any way to call the updateUser function and force it to work, even when the password isn't supplied?