Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/lib/txplib_admin.php - 314 lines - 9816 bytes - Source - Print

Description: Collection of password handling functions.

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

send_account_activation()
send_reset_confirmation_request()
send_password()
send_new_password()
generate_password()
reset_author_pass()

Functions

Functions that are not part of a class:

send_account_activation($name line: 30
Emails a new user with account details and requests they set a password.

return: bool FALSE on error.
param: string $name     The login name
send_reset_confirmation_request($name line: 78
Sends a password reset link to a user's email address.

This function will return a success message even when the specified user
doesn't exist. Though an error message could be thrown when a user isn't
found, security best practice prevents leaking existing account names.

return: string A localized message string
param: string $name The login name
send_password($RealName, $name, $email, $password line: 155
Emails a new user with login details.

This function can be only executed when the currently authenticated user
trying to send the email was granted 'admin.edit' privileges.

Should NEVER be used as sending plaintext passwords is wrong.
Will be removed in future, in lieu of sending reset request tokens.

return: bool FALSE on error.
param: string $RealName The real name
param: string $name     The login name
param: string $email    The email address
param: string $password The password
send_new_password($password, $email, $name line: 196
Sends a new password to an existing user.

If the $name is FALSE, the password is sent to the currently
authenticated user.

Should NEVER be used as sending plaintext passwords is wrong.
Will be removed in future, in lieu of sending reset request tokens.

return: bool FALSE on error.
param: string $password The new password
param: string $email    The email address
param: string $name     The login name
generate_password($length = 10)  line: 237
Generates a password.

Generates a random password of given length using the symbols set in
PASSWORD_SYMBOLS constant.

Should NEVER be used as it is not cryptographically secure.
Will be removed in future, in lieu of sending reset request tokens.

return: string Random plain-text password
param: int $length The length of the password
reset_author_pass($name line: 280
Resets the given user's password and emails it.

The old password is replaced with a new random-generated one.

Should NEVER be used as sending plaintext passwords is wrong.
Will be removed in future, in lieu of sending reset request tokens.

return: string A localized message string
param: string $name The login name

title

Body