error while saving user

bonhommie - August 21, 2008 - 17:25
Project:Secure Password Hashes (phpass)
Version:5.x-1.3
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Every time I edit a user (even without changing their password), I get the error below:

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 '(hash, name) VALUES ('$P$BkKaA0PnSnjesZBdnFGJrgJBdB6/5A0', ) WHERE uid = 1' at line 1 query: UPDATE user_phpass SET (hash, name) VALUES ('$P$BkKaA0PnSnjesZBdnFGJrgJBdB6/5A0', ) WHERE uid = 1 in /home/greathe/base/includes/database.mysql.inc on line 172

any ideas?
thanks

#1

douggreen - August 22, 2008 - 15:36

That code gets run when you submit the user edit form, regardless of whether you changed the password. So that part makes sense.

However, the SQL is messed up, and I don't see how the code could possibly generate it. Does line 32 of phpass.module say:

    db_query("UPDATE {user_phpass} SET hash = '%s' WHERE uid = %d", $phpass_hash, $uid);

That's the only "UPDATE user_phpass" in the code, so phpass is not messing this up. It's possible that some other module's db_rewrite_sql is causing the problem... Have you recently added some other module?

 
 

Drupal is a registered trademark of Dries Buytaert.