$checkUsername = $modx->db->query("SELECT `id` FROM ".$web_users." WHERE `username`=’".$username."’");
$limit = $modx->recordCount($checkUsername);
if ($limit > 0)
{
return $this->FormatMessage($this->LanguageArray[7]);
}
In my WLPE install, this line of code is giving me an error (right now, there is no users in the web_user table, since I had to empty the table to get rid of a username that was making it act up. BTW, this is from the webloginpe.class.php file.
Anyways, that line of code returns an error that the user already exists --- could someone explain to me how the PHP works, so I can try to debug the issue? (Oddly enough, this issue does the same thing when it checks the email records, which had basically the same syntax --- and when I remove those two pieces of checking, it gives this error --- might help show what the error is...)
« MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:
« Execution of a query to the database failed - Duplicate entry ’Wilhelm’ for key 2 »
SQL: INSERT INTO `symphon_cms`.`modx_web_users` (`username`, `password`, `cachepwd`) VALUES (’Wilhelm’, ’XXX’, ’XXX’)
[Copy SQL to ClipBoard]
Parser timing
MySQL: 0.0168 s (18 Requests)
PHP: 0.5884 s
Total: 0.6052 s
BTW, I posted this here, since it seems to be a PHP syntax issue, and Scotty’s MIA from that section recently. I thought I might get some help if I posted in a general place like this.