pagemachine / hairu
3.1.3
2023-01-25 07:31 UTC
Requires
- php: ^7.4
- typo3/cms-core: ^9.5.6 || ^10.4
- typo3/cms-extbase: ^9.5.6 || ^10.4
- typo3/cms-fluid: ^9.5.6 || ^10.4
- typo3/cms-frontend: ^9.5.6 || ^10.4
Requires (Dev)
- cakephp/cakephp-codesniffer: ^5.0
- codedungeon/phpunit-result-printer: ^0.32.0
- ergebnis/composer-normalize: ^2.8
- helmich/typo3-typoscript-lint: ^3.0
- nimut/testing-framework: ^6.0
- php-parallel-lint/php-console-highlighter: ^1.0.0
- php-parallel-lint/php-parallel-lint: ^1.2
- phpunit/phpunit: ^9.0
- sclable/xml-lint: ^0.5.0
- slevomat/coding-standard: ^8.0
- squizlabs/php_codesniffer: ^3.0
Suggests
- typo3/cms-saltedpasswords: For password hashing in TYPO3v8
Replaces
- typo3-ter/hairu: 3.1.3
README
基于Extbase/Fluid的灵活登录/注销表单,用于替换TYPO3 CMS中提供的 felogin 扩展。
入る (hairu,日语) 的意思是“进入”
安装
此扩展可以从多个来源安装
安装后,在“表单元素”部分将提供两个新的内容元素:“身份验证表单”和“密码编辑表单”。请确保还包含静态模板。
配置
在包含静态模板后,模板常量编辑器中将提供一些选项进行自定义。
请确保将“默认存储PID”设置为存储前端用户记录的页面。
您还可以为任何 settings
值使用 stdWrap
属性进行自定义处理。例如,用于简单翻译密码重置邮件主题的示例
plugin.tx_hairu {
settings {
passwordReset {
mail {
subject.stdWrap.data = LLL:.../locallang.xlf:passwordReset.mail.subject
}
}
}
}
密码验证
密码重置和更新过程中应用的验证规则可以通过TypoScript自由定制。以下是从默认配置的示例
plugin.tx_hairu {
// ...
mvc.validation {
// Validation of Authentication controller action arguments
Authentication {
// ...
completePasswordReset {
password {
1 {
type = StringLength
options {
minimum = 5
}
}
}
}
}
Password {
updatePassword {
password {
1 {
type = StringLength
options {
minimum = 5
}
}
}
}
}
}
}
只要Extbase可以解析,您就可以使用任何验证器类型。在示例中,内置的 StringLength
验证器设置为最小长度为5。
支持的验证器类型格式如下
- Extbase内置验证器:
StringLength
(解析为TYPO3\CMS\Extbase\Validation\Validator\StringLengthValidator
) - 完全限定类名:
Vendor\Package\Validation\Validator\CustomValidator
- 简写语法:
Vendor.Package:CustomValidator
(解析为Vendor\Package\Validation\Validator\CustomValidator
)
问题
发现了一个错误?需要功能?通过我们的 问题跟踪器告诉我们。
测试
可以使用提供的Docker Compose定义执行所有测试
docker-compose run --rm app composer build
鸣谢
图标由 Freepik 在 www.flaticon.com 创建,并许可 CC 3.0 BY