LLMS_Forms::are_usernames_enabled()
Determine if usernames are enabled on the site.
Description Description
This method is used to determine if a username can be used to login / reset a user’s password.
A reference to every form with a username block is stored in an option. The option is an array of integers, the WP_Post IDs of all the form posts containing a username block.
If the array is empty, there are no forms with username blocks and, therefore, usernames are disabled. If the array contains at least one item that means there is a form with a username block in it and, we therefore consider usernames to be enabled for the site.
This isn’t perfect. We’re well aware. But usernames are kind of silly anyway, right? Just use the email address like your average website owner and stop pretending usernames matter.
Return Return
(bool)
Source Source
File: includes/forms/class-llms-forms.php
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |