Solstice::Person - Represents a person in the Solstice framework.


Solstice documentation  | view source Contained in the Solstice distribution.

Index


NAME

Top

Solstice::Person - Represents a person in the Solstice framework.

SYNOPSIS

Top

  my $person    = Solstice::Person->new();
  $person        = Solstice::Person->new($person_id);

  my $person2   = Solstice::Person->new();
  my $equal     = $person->equals($person2);




DESCRIPTION

Top

This object represents a person, most commonly a logged in user, or someone who is authorized to make use of something.

Subclassing this module is recommended for specific implementations.

Superclass Solstice::Model (Solstice::Model)

Export

No symbols exported.

Methods

new()
new($person_id)

Instantiates a new person object. If given an id of a person, this will return undef unless there is a person in the local data store matching that id.

store()

Saves person attributes to the datastore. Returns TRUE on success, FALSE otherwise.

delete()

Remove the person from the datastore.

getID()

Accessor for the person's primary key in the local datastore.

getLoginRealm()

Accessor for the login realm that the person authenticates against. This allows for multiple authentication methods.

setLoginRealm($login_realm)
getLoginName()

Accessor for the login name of the user. This should be whatever key is used to identify the user via Apache's REMOTE_USER variable.

setLoginName($name)
getRemoteKey()

Returns the peron's primary key oh the realm side, if known.

getName()

Accessor for the person's user-selected name.

setName($name)

Sets the user-selected name.

getSurname()

Accessor for the person's user-selected surname.

setSurname($sur_name)

Sets the user-selected surname.

getEmail()

Accessor for the user-selected email.

setEmail($email_address)

Sets the user-selected email address.

getSystemName()

Accessor for the system-defined, non-editable person's name.

setSystemName($name)

Allows the system first name to be set, this should not be chosen by the user.

getSystemSurname()

Accessor for the system-defined, non-editable person's surname.

setSystemSurname($sur_name)

Allows the system surname to be set, this should not be chosen by the user.

getSystemEmail()

Accessor for the system-defined, non-editable person's email address.

setSystemEmail($email_address)

Allows the system email address to be set, this should not be chosen by the user.

getCreationDate()

Returns a Solstice::DateTime that represents the date the Person was first stored.

getModificationDate()

Returns a Solstice::DateTime that represents the date the Person was last stored, with changes.

getSystemModificationDate()

Returns a Solstice::DateTime that represents the date the Person was last stored by an automated system.

equals($person)

Returns TRUE if the passed $person obj represents the same person as $self, FALSE otherwise.

setPassword($password)

Allows the user's password to be set. Note that this may not be necessary, depending on the AuthN method.

hasPassword
checkPasswordResetTicket($str)
getPasswordResetTicket()

Output Methods

getScopedLoginName()

Returns the loginname, scoped to the identity provider. e.g., joe@washington.edu, joe@idp.protectnetwork.org.

getFullName($delimiter)

Returns a full name for the person, created from whatever data we have available. A delimiter can be specified, default is a single space.

getSystemFullName($delimiter)
getReverseFullName($delimiter)

Returns a full name for the person, created from whatever data we have available. A delimiter can be specified.

getReverseSystemFullName($delimiter)

Returns a full name for the person, using system data. A delimiter can be specified.

getMoniker()

Returns a name string, using best available data.

getSystemMoniker()

Returns a name string, using best available system data.

getFullMoniker()

Returns a name string, using best available data.

getEmailAddress()

Returns an email address, falling back on system info if necessary.

Private Methods

_getNameTokens()

Return an array ref of person name tokens.

_getUserNameTokens {

Return an array ref of person name tokens, or undef.

_getSystemNameTokens {

Return an array ref of person name tokens, or undef.

_initFromLogin($username, $password)

Initializes a Person based on login information, if it is correct.

_initFromID($person_id)

Initializes the person from the database.

_initFromHash(\%hash)

Does a minimal initialization, with data from an outside source.

_isValidLoginRealm($obj)
_taintLogin()
_untaintLogin()
_isLoginTainted()
_getAccessorDefinition()

AUTHOR

Top

Catalyst Group, <catalyst@u.washington.edu>

VERSION

Top

$Revision: $

COPYRIGHT

Top


Solstice documentation  | view source Contained in the Solstice distribution.