PHP Classes

Bug Fix

Recommend this page to a friend!

      AdminPro class  >  All threads  >  Bug Fix  >  (Un) Subscribe thread alerts  
Subject:Bug Fix
Summary:Some configurations of MySQL can not add users
Author:Alec Wood
Date:2010-04-14 15:32:28

  1. Bug Fix   Reply   Report abuse  
Picture of Alec Wood Alec Wood - 2010-04-14 15:32:28
For some configurations of MySql the add user function does not work

In adminuser.php, line 320

$SQL.=" VALUES ( '', '".$userName."', '".md5($userPass)."', '".$isAdmin."', '".$userGroup."', '', '', '".$userRemark."')";

This gave two database errors, one for trying to insert a value into ID column, and one for invalid date/time in lastlog column

Changed the line to

$SQL.=" VALUES ( NULL, '".$userName."', '".md5($userPass)."', '".$isAdmin."', '".$userGroup."', '', '0000-00-00 00:00:00', '".$userRemark."')";

Made the same edit on line 323. It works OK now.