OK, I’ve had some success finding a work-around for this bug.
As indicated above, It seems MODx 0.9.5 does not play well with MySQL 5 when the SQL Mode is set to ’STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION’. In this condition the creation of new web users will fail, as will the updates to the details for the Built-in Administration account. This is because MODx inserts empty PHP variables into fields that are set to NOT NULL. See related bugs:
http://modxcms.com/bugs/task/167
My suggested workaround involves modifying how these empty empty PHP variables are handled in ’save_web_user.processor.php’ (and possibly ’save_user.processor.php’ too). The variables in question are ’role’, ’gender’, ’dob’, ’blocked’, ’blockeduntil’ and ’blockedafter’. I substituted the block of code starting at about line 34 with the code below and found I could then add new web users without error. You may find you have to modify an identical block in ’save_user.processor.php’
$id = intval($_POST[’id’]);
$oldusername = $_POST[’oldusername’];
$newusername = !empty ($_POST[’newusername’]) ? $_POST[’newusername’] : "New User";
$fullname = mysql_escape_string($_POST[’fullname’]);
$genpassword = $_POST[’newpassword’];
$passwordgenmethod = $_POST[’passwordgenmethod’];
$passwordnotifymethod = $_POST[’passwordnotifymethod’];
$specifiedpassword = $_POST[’specifiedpassword’];
$email = mysql_escape_string($_POST[’email’]);
$oldemail = $_POST[’oldemail’];
$phone = mysql_escape_string($_POST[’phone’]);
$mobilephone = mysql_escape_string($_POST[’mobilephone’]);
$fax = mysql_escape_string($_POST[’fax’]);
//$dob = ConvertDate($_POST[’dob’]); /* Changed to comply with MySQL 5 strict data integrity checks */
$dob = !empty ($_POST[’dob’]) ? $_POST[’dob’] : 0;
$country = $_POST[’country’];
$state = mysql_escape_string($_POST[’state’]);
$zip = mysql_escape_string($_POST[’zip’]);
// $gender = $_POST[’gender’]; /* Changed to comply with MySQL 5 strict data integrity checks */
$gender = !empty ($_POST[’gender’]) ? $_POST[’gender’] : 0;
$photo = mysql_escape_string($_POST[’photo’]);
$comment = mysql_escape_string($_POST[’comment’]);
//$roleid = $_POST[’role’]; /* Changed to comply with MySQL 5 strict data integrity checks */
$roleid = !empty ($_POST[’role’]) ? $_POST[’role’] : 0;
$failedlogincount = $_POST[’failedlogincount’];
//$blocked = $_POST[’blocked’]; /* Changed to comply with MySQL 5 strict data integrity checks */
$blocked = !empty ($_POST[’blocked’]) ? $_POST[’blocked’] : 0;
//$blockeduntil = ConvertDate($_POST[’blockeduntil’]); /* Changed to comply with MySQL 5 strict data integrity checks */
$blockeduntil = !empty ($_POST[’blockeduntil’]) ? $_POST[’blockeduntil’] : 0;
//$blockedafter = ConvertDate($_POST[’blockedafter’]); /* Changed to comply with MySQL 5 strict data integrity checks */
$blockedafter = !empty ($_POST[’blockedafter’]) ? $_POST[’blockedafter’] : 0;
$user_groups = $_POST[’user_groups’];