-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
283 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ | |
* config, but will probably be extended in future to provide additional | ||
* functionality. | ||
* | ||
* @author i-lateral (http://www.i-lateral.com) | ||
* @package users | ||
* @package Users | ||
* @author i-lateral <[email protected]> | ||
*/ | ||
class Users | ||
{ | ||
|
@@ -21,36 +21,36 @@ class Users | |
/** | ||
* Minimum character length of the password required | ||
* on registration/account editing | ||
* | ||
* @var int | ||
* | ||
* @var int | ||
* @config | ||
*/ | ||
private static $password_min_length = 6; | ||
*/ | ||
private static $password_min_length = 6; | ||
|
||
/** | ||
* Maximum character length of the password required | ||
/** | ||
* Maximum character length of the password required | ||
* on registration/account editing | ||
* | ||
* @var int | ||
* | ||
* @var int | ||
* @config | ||
*/ | ||
private static $password_max_length = 16; | ||
*/ | ||
private static $password_max_length = 16; | ||
|
||
/** | ||
* Enforces strong password (at least one digit and one alphanumeric | ||
* character) on registration/account editing | ||
* | ||
* @var boolean | ||
/** | ||
* Enforces strong password (at least one digit and one alphanumeric | ||
* character) on registration/account editing | ||
* | ||
* @var boolean | ||
* @config | ||
*/ | ||
private static $password_require_strong = false; | ||
*/ | ||
private static $password_require_strong = false; | ||
|
||
/** | ||
* Stipulate if a user requires verification. NOTE this does not | ||
* actually deny the user the ability to login, it only alerts them | ||
* that they need validiation | ||
* | ||
* @var boolean | ||
* @var boolean | ||
* @config | ||
*/ | ||
private static $require_verification = true; | ||
|
@@ -59,7 +59,7 @@ class Users | |
* Stipulate whether to send a verification email to users after | ||
* registration | ||
* | ||
* @var boolean | ||
* @var boolean | ||
* @config | ||
*/ | ||
private static $send_verification_email = false; | ||
|
@@ -68,15 +68,15 @@ class Users | |
* Stipulate the sender address for emails sent from this module. If | ||
* not set, use the default @Email.admin_email instead. | ||
* | ||
* @var string | ||
* @var string | ||
* @config | ||
*/ | ||
private static $send_email_from; | ||
|
||
/** | ||
* Auto login users after registration | ||
* | ||
* @var boolean | ||
* @var boolean | ||
* @config | ||
*/ | ||
private static $login_after_register = true; | ||
|
@@ -85,30 +85,20 @@ class Users | |
* Add new users to the following groups. This is a list of group codes. | ||
* Adding a new code will add the user to this group | ||
* | ||
* @var array | ||
* @var array | ||
* @config | ||
*/ | ||
private static $new_user_groups = [ | ||
"users-frontend" | ||
]; | ||
|
||
/** | ||
* Add a group to the list of groups a new user is added to on | ||
* registering. | ||
* | ||
* @param string Group code that will be used | ||
*/ | ||
public static function addNewUserGroup($code) | ||
{ | ||
Deprecation::notice("1.3", "addNewUserGroup depreciated, use global config instead"); | ||
self::config()->new_user_groups[] = $code; | ||
} | ||
|
||
/** | ||
* Remove a group from the list of groups a new user is added to on | ||
* registering. | ||
* | ||
* @param string Group code that will be used | ||
* @param string $code Group code that will be used | ||
* | ||
* @return void | ||
*/ | ||
public static function removeNewUserGroup($code) | ||
{ | ||
|
@@ -121,30 +111,20 @@ public static function removeNewUserGroup($code) | |
* Groups a user will be added to when verified. This should be an | ||
* array of group "codes", NOT names or ID's | ||
* | ||
* @var array | ||
* @var array | ||
* @config | ||
*/ | ||
private static $verification_groups = [ | ||
"users-verified" | ||
]; | ||
|
||
/** | ||
* Add a group toextends Object the list of groups a new user is added to on | ||
* registering. | ||
* | ||
* @param string Group code that will be used | ||
*/ | ||
public static function addVerificationGroup($code) | ||
{ | ||
Deprecation::notice("1.3", "addVerificationGroup depreciated, use global config instead"); | ||
self::config()->verification_groups[] = $code; | ||
} | ||
|
||
/** | ||
* Remove a group from the list of groups a new user is added to on | ||
* registering. | ||
* | ||
* @param string Group code that will be used | ||
* @param string $code Group code that will be used | ||
* | ||
* @return void | ||
*/ | ||
public static function removeVerificationGroup($code) | ||
{ | ||
|
Oops, something went wrong.