mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Remove psuedo-property SetPassword from Member
This commit is contained in:
parent
cdf6ae45a3
commit
413034f684
@ -2507,6 +2507,7 @@ New `TimeField` methods replace `getConfig()` / `setConfig()`
|
||||
|
||||
* `LoginForm` now has an abstract method `getAuthenticatorName()`. If you have made subclasses of this,
|
||||
you will need to define this method and return a short name describing the login method.
|
||||
* `MemberLoginForm` has a new constructor argument for the authenticator class, athough tis is usually
|
||||
* `MemberLoginForm` has a new constructor argument for the authenticator class, although this is usually
|
||||
constructed by `MemberAuthenticator` and won't affect normal use.
|
||||
* `Authenticator` methods `register` and `unregister` are deprecated in favor of using `Config`
|
||||
* `Authenticator` methods `register` and `unregister` are deprecated in favour of using `Config`
|
||||
* Unused `SetPassword` property removed from `Member`. Use `Member::changePassword` or set `Password` directly.
|
||||
|
@ -56,7 +56,6 @@ use SilverStripe\ORM\ValidationResult;
|
||||
* @property int $FailedLoginCount
|
||||
* @property string $DateFormat
|
||||
* @property string $TimeFormat
|
||||
* @property string $SetPassword Pseudo-DB field for temp storage. Not emitted to DB
|
||||
*/
|
||||
class Member extends DataObject
|
||||
{
|
||||
@ -858,10 +857,6 @@ class Member extends DataObject
|
||||
*/
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
if ($this->SetPassword && !$this->passwordChangesToWrite) {
|
||||
$this->Password = $this->SetPassword;
|
||||
}
|
||||
|
||||
// If a member with the same "unique identifier" already exists with a different ID, don't allow merging.
|
||||
// Note: This does not a full replacement for safeguards in the controller layer (e.g. in a registration form),
|
||||
// but rather a last line of defense against data inconsistencies.
|
||||
@ -1653,12 +1648,6 @@ class Member extends DataObject
|
||||
}
|
||||
}
|
||||
|
||||
if ((!$this->ID && $this->SetPassword) || $this->isChanged('SetPassword')) {
|
||||
if ($this->SetPassword && $validator) {
|
||||
$valid->combineAnd($validator->validate($this->SetPassword, $this));
|
||||
}
|
||||
}
|
||||
|
||||
return $valid;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user