sfDoctrineGuardPlugin中用于创建新用户的action.class在哪里?
我为 Symfony 1.4.11 安装了 sfDoctrineGuardUser,但找不到注册用户的 action.class。我只找到 class sfGuardCreateUserTask :
protected function execute($arguments = array(), $options = array())
{
$databaseManager = new sfDatabaseManager($this->configuration);
$user = new sfGuardUser();
$user->setEmailAddress($arguments['email_address']);
$user->setUsername($arguments['username']);
$user->setPassword($arguments['password']);
$user->setFirstName($arguments['first_name']);
$user->setLastName($arguments['last_name']);
$user->setIsActive(true);
$user->setIsSuperAdmin($options['is-super-admin']);
$user->save();
$this->logSection('guard', sprintf('Create user "%s"', $arguments['username']));
}
但这不是这个...
我找不到任何地方,例如 $user->setFirstName($arguments['first_name']);< /strong> 并修改为:
$user->setFirstName($arguments['first_name'] . '@');
sfDoctrineGuardPlugin 中用于创建新用户的action.class 在哪里?
I installed sfDoctrineGuardUser for Symfony 1.4.11, but I can't find the action.class, where register user. I find only class sfGuardCreateUserTask :
protected function execute($arguments = array(), $options = array())
{
$databaseManager = new sfDatabaseManager($this->configuration);
$user = new sfGuardUser();
$user->setEmailAddress($arguments['email_address']);
$user->setUsername($arguments['username']);
$user->setPassword($arguments['password']);
$user->setFirstName($arguments['first_name']);
$user->setLastName($arguments['last_name']);
$user->setIsActive(true);
$user->setIsSuperAdmin($options['is-super-admin']);
$user->save();
$this->logSection('guard', sprintf('Create user "%s"', $arguments['username']));
}
but this isn't this...
I can't find anywhere for example $user->setFirstName($arguments['first_name']); and modified to:
$user->setFirstName($arguments['first_name'] . '@');
Where is the action.class in sfDoctrineGuardPlugin for create new user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
基本上,您不需要该操作(或自定义它)来创建新用户。只需创建一个自定义操作来生成您的注册表单并处理帖子:
Basically, you don't need that action (or to customize it) in order to create new users. Just create a custom action that generates your registration form and handles the post:
尝试
或类似的东西,
如果这就是您正在寻找的内容,请不要在那里重写它!
相反,将操作复制到普通的 sfGuard 模块并在那里进行编辑
try
or something similar
if this is what you're looking for, don't rewrite it in there!!
Instead, copy the action to your normal sfGuard module and edit it there
symfony 团队已经发布了您需要的所有内容:
Everything you need is already published by the symfony team :