Database error when creating new users or modifying passwords in usermgr.php Database error when creating new users or modifying passwords in usermgr.php
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Database error when creating new users or modifying passwords in usermgr.php

Started by Casper, January 31, 2005, 03:38:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Casper

Fresh install, standalone 1.4.1 checkout less than 1 hour ago.

You can create new users, but only if you leave the password field blank. If you do leave it blank, the new user cannot log in.

You cannot edit passwords in usermgr.php.

As a new install, this has the password encrypted.

db error is;

QuoteWhile executing query "UPDATE cpg140_users SET user_name = 'Pat', user_email = 'patzscott@rogers.com', user_active = 'YES', user_group = '1', user_profile1 = '', user_profile2 = '', user_profile3 = '', user_profile4 = '', user_profile5 = '', user_profile6 = '', user_group_list = '2'81069b209152545c2c3a86aa40f60699 WHERE user_id = '3'" on 0

mySQL error: 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 '81069b209152545c2c3a86aa40f60699 WHERE user_id = '3'' at line 1

I believe it to be related to this code, which I don't know how to change;

if (strlen($user_password)) $sql_update .= ", user_password = '".($CONFIG['enable_encrypted_passwords'])?md5($user_password):$user_password."'";
    $sql_update .= " WHERE user_id = '$user_id'";
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

It needs an extra set of brackets around it, so it looks like this:

.(($CONFIG['enable_encrypted_passwords'])?md5($user_password):$user_password).

Casper

It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller