Freeside:4:Documentation:Developer/FS/password history

From Freeside
< Freeside:4:Documentation:Developer‎ | FS
Revision as of 07:26, 18 November 2015 by Jeremyd (talk | contribs) (Edit via perl MediaWiki framework (1.13))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NAME

FS::password_history - Object methods for password_history records

SYNOPSIS

 use FS::password_history;

 $record = new FS::password_history \%hash;
 $record = new FS::password_history { 'column' => 'value' };

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::password_history object represents a current or past password used by a login account, employee, or other account managed within Freeside. FS::password_history inherits from FS::Record. The following fields are currently supported:

passwordnum - primary key; _password - the encrypted password, as an RFC2307-style string ("{CRYPT}$2a$08$..." or "{MD5}1ab201f..." or similar). This is a serialized Authen::Passphrase object.; created - the date the password was set to this value. The record with the most recent created time is the current password.

Plus one of the following foreign keys:

svc_acct__svcnum; svc_dsl__svcnum; svc_alarm__svcnum; agent__agentnum; contact__contactnum; access_user__usernum

METHODS

new HASHREF
Creates a new password history record. To add the record to the database, see "insert".
insert; delete; replace OLD_RECORD; check
Checks all fields to make sure this is a valid password history record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
linked_acct
Returns the object that's using this password.
password_equals PASSWORD
Returns true if PASSWORD (plaintext) is the same as the one stored in the history record, false if not.

BUGS

SEE ALSO

FS::Record