Login 1.9.0 Snippets, Controllers and Properties mismatches
Unless the package manager/login package update process has defects, which would be serious...
One of the snippets (isLoggedIn) has a mismatch between the default properties set and what is used in the snippet code (serious). There are mismatches between which properties are listed in a snippet's default properties set and what is set in the corresponding controller's "setDefaultProperties()" array.
All these are listed below. If for no other reason than documentation and useability, these should match.
ActiveUsers
The snippet properties (Default Properties List) has the following which are not listed in the Controller's setDefaultProperties array:
'classKey' => 'modUser' 'tplType' => 'modChunk'
ChangePassword
Controller has elements in its setDefaultProperties array which are not listed in the snippet properties (Default Properties List):
'errTpl' => 'lgnErrTpl' 'validate' => '' 'validateOldPassword' => true
The snippet properties (Default Properties List) has the following which is not in the Controller's setDefaultProperties array:
'postHooks' => ''
ConfirmRegister
Controller has an element in its setDefaultProperties array which is not listed in the snippet properties (Default Properties List):
'redirectBackParams' => ''
ForgotPassword
The snippet properties (Default Properties List) has the following which are not listed in the Controller's setDefaultProperties array:
'errTpl' => 'lgnErrTpl' 'errTplType' => 'modChunk'
isLoggedin
This does not have a controller, but there is a mismatch between the snippet properties (Default Properties List) and what the snippet code actually uses.
&contexts —> $ctxs &redirectparams —> $redirectParams &redirectto —> $redirectTo
Login
The snippet properties (Default Properties List) has the following which are not listed in the Controller's setDefaultProperties array:
'loginResourceId' => 0 'loginResourceParams' => '' 'postHooks' => '' 'recaptchaTheme => 'clean' 'redirectToOnFailedAuth' => '' 'redirectToPrior' => false 'toPlaceholder' => ''
Controller has an element in its setDefaultProperties array which is not listed in the snippet properties (Default Properties List) — perhaps correctly:
'loginContext' => $this->modx->context->get('key')
Profile
The snippet properties (Default Properties List) has the following which is not in the Controller's setDefaultProperties array:
'useExtended' => true
Register
Controller has elements in its setDefaultProperties array which are not listed in the snippet properties (Default Properties List):
'errTpl' => 'lgnErrTpl' 'redirectBack' => '' 'redirectBackParams' => '' 'validate' => ''
The snippet properties (Default Properties List) has the following which are not listed in the Controller's setDefaultProperties array:
'activationttl' => 180 'allowedFields' => '' 'ensurePasswordStrength' => false 'ensurePasswordStrengthSuggestions' => true 'generatePassword' => false 'mathField' => 'math' 'mathMaxRange' => 100 'mathMinRange' => 10 'mathOp1Field' => 'op1' 'mathOp2Field' => 'op2' 'mathOperatorField' => 'operator' 'maximumPossibleStrongerPasswords' => 25 'minimumStrongPasswordCount' => 3 'recaptchaTheme' => 'clean' 'removeExpiredRegistrations' => true 'trimPassword' => true
ResetPassword
The only mismatch is the 'debug' property which appears in the controller. If that is for the package developer(s), then it is probably correct not to show it in the default properties list of the snippet.
UpdateProfile
Controller has elements in its setDefaultProperties array which are not listed in the snippet properties (Default Properties List):
'errTpl' => '[[+error]]' 'successKey' => 'updsuccess' 'successMsg' => $this->modx->lexicon('login.profile_updated') 'successMsgPlaceholder' => 'error.message' 'validate' => ''
The snippet properties (Default Properties List) has the following which is not listed in the Controller's setDefaultProperties array:
'allowedFields' => ''
UP! It is actual. Update info please.