the beginnings of the message log replacement

This commit is contained in:
JT Smith 2006-01-31 21:45:17 +00:00
parent 3816ad750f
commit 518a65df78
3 changed files with 316 additions and 1 deletions

View file

@ -17,7 +17,7 @@ package WebGUI::User;
use strict;
use WebGUI::Cache;
use WebGUI::Group;
use WebGUI::User::Inbox;
=head1 NAME
@ -46,6 +46,8 @@ This package provides an object-oriented way of managing WebGUI users as well as
$u->deleteFromGroups(\@arr);
$u->delete;
my $inbox = $u->inbox;
=head1 METHODS
These methods are available from this class:
@ -137,6 +139,7 @@ Deletes this user.
sub delete {
my $self = shift;
$self->uncache;
$self->inbox->delete;
foreach my $groupId (@{$self->getGroups($self->userId)}) {
WebGUI::Group->new($self->session,$groupId)->deleteUsers([$self->userId]);
}
@ -179,6 +182,7 @@ Deconstructor.
sub DESTROY {
my $self = shift;
$self->{_inbox}->DESTROY if (exists $self->{_inbox});
undef $self;
}
@ -230,6 +234,23 @@ sub identifier {
return $self->{_user}{"identifier"};
}
#-------------------------------------------------------------------
=head2 inbox
Returns the user's WebGUI::User::Inbox object.
=cut
sub inbox {
my $self = shift;
unless ($self->{_inbox}) {
$self->{_inbox} = WebGUI::User::Inbox->new($self);
}
return $self->{_inbox};
}
#-------------------------------------------------------------------
=head2 isInGroup ( [ groupId ] )