Fixed a bug where this module would crash if a user that didn't exist was specified to retrieve data from.
This commit is contained in:
parent
e64e640a31
commit
fadd3ac327
1 changed files with 3 additions and 1 deletions
|
|
@ -269,7 +269,9 @@ sub new {
|
|||
$userId = shift || 1;
|
||||
$userId = _create() if ($userId eq "new");
|
||||
%user = WebGUI::SQL->quickHash("select * from users where userId='$userId'");
|
||||
%profile = WebGUI::SQL->buildHash("select userProfileField.fieldName, userProfileData.fieldData from userProfileField, userProfileData where userProfileField.fieldName=userProfileData.fieldName and userProfileData.userId=$user{userId}");
|
||||
%profile = WebGUI::SQL->buildHash("select userProfileField.fieldName, userProfileData.fieldData
|
||||
from userProfileField, userProfileData where userProfileField.fieldName=userProfileData.fieldName and
|
||||
userProfileData.userId='$user{userId}'");
|
||||
bless {_userId => $userId, _user => \%user, _profile =>\%profile }, $class;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue