SYNOPSIS

  use RT::CurrentUser

DESCRIPTION

METHODS

UserObj

  Returns the RT::User object associated with this CurrentUser object.

PrincipalObj

    Returns this user's principal object.  this is just a helper routine for
    $self->UserObj->PrincipalObj

PrincipalId

    Returns this user's principal Id.  this is just a helper routine for
    $self->UserObj->PrincipalId

LoadByEmail

Loads a User into this CurrentUser object. Takes the email address of the user to load.

LoadByGecos

Loads a User into this CurrentUser object. Takes a unix username as its only argument.

LoadByName

Loads a User into this CurrentUser object. Takes a Name. =cut

sub LoadByName { my $self = shift; my $identifier = shift; $self->LoadByCol("Name",$identifier); } # }}}

# {{{ sub Load

Load

Loads a User into this CurrentUser object. Takes either an integer (users id column reference) or a Name The latter is deprecated. Instead, you should use LoadByName. Formerly, this routine also took email addresses.

IsPassword

Takes a password as a string. Passes it off to IsPassword in this user's UserObj. If it is the user's password and the user isn't disabled, returns 1.

Otherwise, returns undef.

Privileged

Returns true if the current user can be granted rights and be a member of groups.

HasRight

calls $self->UserObj->HasRight with the arguments passed in

LanguageHandle

Returns this current user's langauge handle. Should take a language specification. but currently doesn't

CurrentUser

Return the current currentuser object