I've set up a test site to try out this module. My first user (uid1) was created with my nt username. In my case 'cooperaj'. I installed and enabled the module. New users have been able to access the site and new users have been automatically created. great.

But then I clicked on 'Logout', just to see what happened, and now my site is fubar'd. I'm getting this SQL error.

    * user warning: Duplicate entry 'cooperaj' for key 2 query: INSERT INTO users (name, pass, init, status, created, uid) VALUES ('cooperaj', '6411532ba4971f378391776a9db629d3', 'UK\\\\cooperaj', 1, 1143792497, 13) in C:\webroot\includes\database.mysql.inc on line 120.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in C:\webroot\modules\user.module on line 348.
    * warning: implode() [function.implode]: Bad arguments. in C:\webroot\modules\user.module on line 348.
    * 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 C:\webroot\includes\database.mysql.inc on line 120.

The site also seems to have completely failed. In that I end up on an 'access denied' page without any of the primary links that I have set up. Instead just 'edit primary links'

Fortunately this was a test setup.

Thanks
Adam

Comments

cooperaj’s picture

Component: 0 » Code

I seem to have fixed this error. I had a look in the database, Specifically the authmap table and found that my username was mapped to uid '0'. I changed the uid field to '1' and now everything is working fine.

Not sure where to look for this issue in the code.

Anonymous’s picture

Status: Active » Closed (fixed)

Marking closed since the user appears to have fixed the issue.