Apache version 2.2.23
PHP version 5.3.17
MySQL version 5.5.27-cll
MODX version: 2.2.6-pl(advanced)
In my CMP the following code causes the error:
<?php
//....
$user = $modx->getObject('modUser', array('username'=>$line['username']));
if ( $user ){
if($line['delete']===true){
if($user->remove()){
$deletedCount++;
$modx->mycmp->log('info',$this->modx->lexicon('mycmp.user.deleted',$line));
}
}
}
//.... }
The log displays these messages:
Could not get table class for class: modAccess
Could not get table name for class: modAccess
Error 42000 executing statement:
Array
(
[0] => 42000
[1] => 1064
[2] => 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 'AS `modAccess` WHERE `modAccess`.`principal` = 3135' at line 1
)
Removed modUserProfile instance with primary key 3135
Removed modUserGroupMember instance with primary key 101
Removed modUserGroupMember instance with primary key 102
Removed modUserGroupMember instance with primary key 103
Removed modUser instance with primary key 3135
User "johndoe" has been deleted. (my message)
The user is successfully deleted but I get these error message for each user. Is there anything I'm doing wrong or is this a bug?