dcentrica/silverstripe-registration
Composer 安装命令:
composer require dcentrica/silverstripe-registration
包简介
Silverstripe member registration module
README 文档
README
About
It does exactly what it says on the tin: Provides a route /Security/register to a basic membership form for users to register with your Silverstripe application. It also provides a profile form, for your users to maintain their profiles.
Requirements
PHP ^8silverstripe/framework ^5- Does not require
silverstripe/cms.
Configuration
An environment variable REGISTRATION_ENABLED should be set in your hosting environment for the registration form to show. You can also choose to hide the form in userland code based on an arbitrary boolean using $handler->setHideCondition(). Just overload this modules' getRegistrationHandler() method in your own Authenticator subclass as follows:
/**
* @param string $link
* @return RegistrationHandler
*/
public function getRegistrationHandler(string $link): RegistrationHandler
{
$handler = parent::getRegistrationHandler($link, $this);
return $handler->setHideCondition((bool) Environment::getEnv('SOME_VAR'));
}
There's also an optional extension for augmenting Member records with a field, whose value tells userland systems that a user was indeed created via registration.
SilverStripe\Security\Member: extensions: - Dcentrica\Registration\Extension\MemberRegistrationExtension
By default, newly registered users are automatically logged-in. However, this behaviour can be configured as follows:
Dcentrica\Registration\Security\RegistrationHandler: # Prevent Silverstripe from auto-logging-in post registration login_after_register: false
You can add an optional "success" message when registration is complete. This is useful to show if you do not want registered users to be automatically logged-in:
Dcentrica\Registration\Security\RegistrationHandler: registration_completion_message: 'Well done, you filled in a form. Who's a good boy?'
This module used to account for any Silverstripe BackURL which existed anywhere in the system's request params. Since this isn't guaranteed to be used everywhere, it's now behind an environment variable. If your system needs to redirect post-registration in this way, then ensure you set the REGISTRATION_USE_BACKURL environment variable.
Caveats
- The module does not include any form of profile management (unlike the module this package was forked from).
- The module does not include any form of spam protection.
History
Forked from tony13tv/silverstripe-registration to work with Silverstripe 5+ and finish off a few rough edges.
License
This module retains the original module's MIT license "claim" (the original module didn't come with a LICENSE file, nor did it stipulate its licensing in any file headers).
dcentrica/silverstripe-registration 适用场景与选型建议
dcentrica/silverstripe-registration 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.07k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 06 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dcentrica/silverstripe-registration 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dcentrica/silverstripe-registration 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-16