mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge up changes from 3.1.19 changelog
This commit is contained in:
parent
0fa9ba5d64
commit
18fcd68acf
@ -1,5 +1,33 @@
|
|||||||
# 3.2.4
|
# 3.2.4
|
||||||
|
|
||||||
|
## Upgrading
|
||||||
|
|
||||||
|
`LoginForm` no longer disables CSRF protection. This may cause regressions on sites that statically publish pages with
|
||||||
|
login forms or other changes. To re-enable this, you'll need to use the `Injector` to create a custom login form.
|
||||||
|
|
||||||
|
Define a login form:
|
||||||
|
|
||||||
|
```php
|
||||||
|
class CustomLoginForm extends MemberLoginForm {
|
||||||
|
|
||||||
|
public function __construct($controller, $name, $fields = null, $actions = null, $checkCurrentUser = true)
|
||||||
|
{
|
||||||
|
parent::__construct($controller, $name, $fields, $actions, $checkCurrentUser);
|
||||||
|
|
||||||
|
$this->disableSecurityToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Add this to mysite/_config/config.yml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
Injector:
|
||||||
|
MemberLoginForm:
|
||||||
|
class: CustomLoginForm
|
||||||
|
```
|
||||||
|
|
||||||
<!--- Changes below this line will be automatically regenerated -->
|
<!--- Changes below this line will be automatically regenerated -->
|
||||||
|
|
||||||
## Change Log
|
## Change Log
|
||||||
|
Loading…
Reference in New Issue
Block a user