Getting the following error on D5.7 installation on initial login since implementing ldap integration, hopefully I'm putting it in the correct issue queue.

warning: array_keys() [function.array-keys]: The first argument should be an array in /net/www/fsd/modules/user/user.module on line 378.

·warning: array_fill() [function.array-fill]: Number of elements must be positive in /net/www/fsd/modules/user/user.module on line 379.

·warning: implode() [function.implode]: Bad arguments. in /net/www/fsd/modules/user/user.module on line 379.

·user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /net/www/fsd/includes/database.mysql.inc on line 172.

Comments

scafmac’s picture

Component: User interface » Code
Category: bug » support

You'll have to share some more details - which ldap modules you're using, what the configuration is, what LDAP server is, etc. Also, it isn't clear to me that this is a bug so I'm changing to to support request.

realityloop’s picture

Only have enabled ldapauth module
Settings
LDAP Integration
-Authentication mode is se to LDAP directory only

A Sun One ldap server

I think the issue may be related to the users email not being saved into profile data, the user gets logged in but the email field is empty.

If the user logs out, even without adding their email address, next time they log in the error does not display.

Junyor’s picture

I have this error message in my log, too. It looks like it happened when an unregistered user attempted to access two pages at the same time (i.e. clicked two links from an e-mail, then logged in). There's also a watchdog note saying the user failed to log in, so that could be related.

I'm using Secure Site and have LDAP Auth set to LDAP directory only.

Anonymous’s picture

Do you have the profile module enabled?

I ask because I can confirm that having ldap_auth enabled with the profile module generates this same error. Turning off the profile module makes the error go away.

I'm in the process of trying to nail down the best way to handle it but from what I can see the best solution is to require ldap_data if the profile module is enabled and ldap_auth is enabled.

Junyor’s picture

Indeed, we do have the profile module enabled.

realityloop’s picture

Likewise, yes

realityloop’s picture

I fixed this issue by using this patch:
error in SQL syntax in user.module on line 368 (or 378)

johnbarclay’s picture

Status: Active » Closed (won't fix)

Closing 5.x issues to clean out issue queue.