Datamanager 2 midgard_person compatible password datatype

This encapsulates a Midgard password. When loading, the type automatically detects crypted and plain text passwords. A crypted password is represented by a null value (not an empty string). The '**' prefix of plain text passwords is not part of the value.

Internally, the type holds a copy of the password value in crypted / uncrypted form, depending on configuration. The type value, if set, transformed into an appropriate storage represenation on transfrom-to-storage operations.

This type does not allow you to unset your password as attempts to set an empty password are ignored.

Available configuration options:

  • boolean crypted: Set this to true if you want to store the password crypted. This is enabled by default. Crypt mode is currently enforcing standard crypt operation, which is used in Midgard Databases.
package midcom.helper.datamanager2

 Methods

_update_real_value ()

Internal helper function, which converts the currently set value (the clear-text password) to the desired storage format, either crypting or prepending a double asterisk.
access protected

convert_from_csv ($source)

Parameters

$source

convert_from_storage ($source)

Parameters

$source

convert_to_csv ()

convert_to_html ()

HTML display for password always displays asterisks only

Returns

string

convert_to_storage ()

 Properties

 

string $_real_value

The real value as stored in the object.

This takes crypting etc. into account.

 

boolean $crypted

Indicating crypted operation
param
 

string $value

The current clear text value of the current password, if available, or null in case of a crypted password.

Set this to the new password value if you want to store anything. The password must be non-null and a non-empty string for any storage operation to take place.