Account release candidate - final changes before merge
This commit is contained in:
parent
aec93573f0
commit
11d18075fa
45 changed files with 3379 additions and 1325 deletions
|
|
@ -18,19 +18,34 @@ Package WebGUI::Macro::User
|
|||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Macro for displaying information from the current User's profile.
|
||||
Macro for displaying information from the a User's profile.
|
||||
|
||||
=head2 process( field )
|
||||
=head2 process( field [, userId] )
|
||||
|
||||
process takes a single parameter, the name of a field in the current user's User Profile from
|
||||
the data stored in $session . If the field does not exist, undef is returned.
|
||||
This macro tries to return the profile field passed in for the user
|
||||
passed in. If not user is passed in, the current user in session
|
||||
will be used.
|
||||
|
||||
=head3 field
|
||||
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my $session = shift;
|
||||
return $session->user->profileField(shift);
|
||||
my $session = shift;
|
||||
my $field = shift;
|
||||
my $userId = shift;
|
||||
|
||||
return undef unless ($field);
|
||||
|
||||
my $user = ($userId)
|
||||
? WebGUI::User->new($session,$userId)
|
||||
: $session->user
|
||||
;
|
||||
|
||||
return $user->profileField($field);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue