\org_openpsa_user_validator

Form validation functionality

Summary

Methods
Properties
Constants
is_username_available()
validate_edit_form()
validate_create_form()
verify_existing_password()
username_exists()
email_exists()
email_and_username_exist()
password_check()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

is_username_available()

is_username_available(array  $fields) : mixed

Test if username is available.

If the formdata contains a person GUID, it is ignored during the search

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

validate_edit_form()

validate_edit_form(array  $fields) : mixed

Validation rules for edit forms

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

validate_create_form()

validate_create_form(array  $fields) : mixed

Validation rules for create forms

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

verify_existing_password()

verify_existing_password(array  $fields) : mixed

Validate the existing password

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

username_exists()

username_exists(array  $fields) : mixed

Test if a username exists

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

email_exists()

email_exists(array  $fields) : mixed

Test is email address exists

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

email_and_username_exist()

email_and_username_exist(array  $fields) : mixed

Test that both email and username exist

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise

password_check()

password_check(array  $fields) : mixed

Test that no previous password is reused & password is strong enough

Parameters

array $fields

Returns

mixed —

True on success, array of error messages otherwise