如何在Symfony 1.4中重置密码? (不使用插件) [英] How to do Password Reset in Symfony 1.4 ? (Without using a plugin)

查看:113
本文介绍了如何在Symfony 1.4中重置密码? (不使用插件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为我的用户登录模块添加重置密码选项.因此,我遵循了 Askeet教程(symfony 1.0).

>

但是当我单击忘记密码"时,我收到了错误消息,它重定向到密码请求操作",并出现以下错误:

致命错误:调用未定义的函数input_tag(),commit_tag,form_error()

为什么这些关键字会出错?那是否意味着这些版本与我的symfony版本不兼容(我使用的是symfony 1.4,本教程适用于symfony 1.0)

有人可以建议我其他方法开发此方法(无需使用插件)吗?

解决方案

这些关键字与Symfony 1.0的旧表单系统相关.从Symfony 1.2开始,不再有包含其所有助手(input_tagtextarea_tag等)的FormHelper,因为它们现在被称为小部件(sfWidgetFormInputsfWidgetFormTextarea等.).

您应该不要,因为它适用于Symfony 1.0,并且您正在使用Symfony 1.4.

相反,您可以看到sfDoctrineGuardPlugin如何处理其重置密码系统(指向模块文件夹的链接,但还要查看表单和模型文件夹).

I want to add a Reset Password option for my User login module. So I've followed Askeet Tutorial (symfony 1.0).

But I'm getting errors when I click forgot password it redirect to "Password request Action" with this error:

Fatal error: Call to undefined function input_tag() , submit_tag, form_error()

Why am I getting erros for those keywords? Is that mean those are not compatible with my symfony version (i'm using symfony 1.4, tutorial is for symfony 1.0)

OR Can any one suggest me any other way to develop this (without using a plugin) ?

解决方案

These keywords are related to the old form system of Symfony 1.0. Since Symfony 1.2, there is no more a FormHelper wich containt all its helper (input_tag, textarea_tag, etc ..) because they are now called widget (sfWidgetFormInput, sfWidgetFormTextarea, etc ..).

You should NOT follow this tutorial since it's for Symfony 1.0 and you are using Symfony 1.4.

Instead, you can see how sfDoctrineGuardPlugin handle its reset password system (the link point to the module folder, but take also a look into form and model folders).

这篇关于如何在Symfony 1.4中重置密码? (不使用插件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆