Updated notification system to allow for much more functionality.

This commit is contained in:
JT Smith 2002-06-28 04:30:36 +00:00
parent 2bb835a445
commit 6d574cd0b9
5 changed files with 133 additions and 73 deletions

View file

@ -295,7 +295,7 @@ sub ldapURL {
=cut
sub new {
my ($class, $userId, %user, %profile);
my (%default, $class, $userId, %default, $value, $key, %user, %profile);
tie %user, 'Tie::CPHash';
$class = shift;
$userId = shift || 1;
@ -304,6 +304,17 @@ sub new {
%profile = WebGUI::SQL->buildHash("select userProfileField.fieldName, userProfileData.fieldData
from userProfileField, userProfileData where userProfileField.fieldName=userProfileData.fieldName and
userProfileData.userId='$user{userId}'");
# %default = WebGUI::SQL->buildHash("select fieldName, dataDefault from userProfileField where profileCategoryId=4");
#foreach $key (keys %default) {
# if ($profile{$key} eq "") {
# $value = eval($default{$key});
# if (ref $value eq "ARRAY") {
# $profile{$key} = $$value[0];
# } else {
# $profile{$key} = $value;
# }
# }
#}
bless {_userId => $userId, _user => \%user, _profile =>\%profile }, $class;
}