Thanks for this great bridge, sirlancelot!
Had some problems because my id and internalKey have not the same value in my table webuserattributes. After hours of searching and debugging I found a little bug, I think, and fixed it like this:
In function GetUserBuilder() changed
$s->AddSelect(array('Name', 'RoleID'), 'usr');
$s->AddSelect(array('UserID', 'FirstName', 'LastName', 'Email', 'UtilizeEmail', 'Icon', 'Picture', 'Attributes', 'Preferences', 'CountVisit', 'CountDiscussions', 'CountComments', 'RemoteIp', 'DateFirstVisit', 'DateLastActive', 'StyleID', 'CustomStyle', 'ShowName', 'UserBlocksCategories', 'DefaultFormatType', 'Discovery', 'SendNewApplicantNotifications'), 'u');
to
$s->AddSelect(array('UserID','Name', 'RoleID'), 'usr');
$s->AddSelect(array('FirstName', 'LastName', 'Email', 'UtilizeEmail', 'Icon', 'Picture', 'Attributes', 'Preferences', 'CountVisit', 'CountDiscussions', 'CountComments', 'RemoteIp', 'DateFirstVisit', 'DateLastActive', 'StyleID', 'CustomStyle', 'ShowName', 'UserBlocksCategories', 'DefaultFormatType', 'Discovery', 'SendNewApplicantNotifications'), 'u');
In function function GetUserById($UserID) changed
$s->AddWhere('u', 'UserID', '', $UserID, '=');
to
$s->AddWhere('u', 'internalKey', '', $UserID, '=');
Seems to work now.
Quote from: sottwell at Jul 28, 2008, 09:23 AM
I’m working on trying to figure out where this is and why it’s causing the error. With all the classes and objects and inherited classes and factories and general clever OOP crap it’s really hard to follow the program flow.