Hi all, I have a form for registration and i have some rules that the field must respect.If i insert the wrong email format,for example,the form says that it is incorrect.The thing that happen is that the password field is filled with md5 password.I have the following view:
<p>Please fill out the form below to register an account.</p> <?php echo $form->create('User',array('action'=>'register'));?>
On Thu, Nov 8, 2012 at 4:26 PM, and <andreaesposit...@gmail.com> wrote:
> Hi all,
> I have a form for registration and i have some rules that the field must
> respect.If i insert the wrong email format,for example,the form says that it
> is incorrect.The thing that happen is that the password field is filled with
> md5 password.I have the following view:
> <p>Please fill out the form below to register an account.</p>
> <?php
> echo $form->create('User',array('action'=>'register'));?>
> ---
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en.
and if possible use an alias for your form field "password" like "pwd" as well as some kind of "pwd_repeat" field to confirm the password (since you cant see it very often it is mistyped rendering the registration invalid then by accident): http://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/
Am Freitag, 9. November 2012 00:33:18 UTC+1 schrieb cricket:
> On Thu, Nov 8, 2012 at 4:26 PM, and <andreaes...@gmail.com <javascript:>> > wrote: > > Hi all, > > I have a form for registration and i have some rules that the field must > > respect.If i insert the wrong email format,for example,the form says > that it > > is incorrect.The thing that happen is that the password field is filled > with > > md5 password.I have the following view:
> > <p>Please fill out the form below to register an account.</p> > > <?php > > echo $form->create('User',array('action'=>'register'));?>
> > --- > > You received this message because you are subscribed to the Google > Groups > > "CakePHP" group. > > To post to this group, send email to cake...@googlegroups.com<javascript:>.
Ok friends i have solved the problem.Can I ask you why this problem arises?
to euromark:I should change the field into the table too because i have users.password column.What I am doing is only an example to see how cakephp works.Thank you for the advice.
Il giorno venerd́ 9 novembre 2012 01:40:24 UTC+1, euromark ha scritto:
> and if possible use an alias for your form field "password" like "pwd" as > well as some kind of "pwd_repeat" field to confirm the password (since you > cant see it very often it is mistyped rendering the registration invalid > then by accident):
> http://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/
> Am Freitag, 9. November 2012 00:33:18 UTC+1 schrieb cricket:
>> On Thu, Nov 8, 2012 at 4:26 PM, and <andreaes...@gmail.com> wrote: >> > Hi all, >> > I have a form for registration and i have some rules that the field >> must >> > respect.If i insert the wrong email format,for example,the form says >> that it >> > is incorrect.The thing that happen is that the password field is filled >> with >> > md5 password.I have the following view:
>> > <p>Please fill out the form below to register an account.</p> >> > <?php >> > echo $form->create('User',array('action'=>'register'));?>
>> > --- >> > You received this message because you are subscribed to the Google >> Groups >> > "CakePHP" group. >> > To post to this group, send email to cake...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > cake-php+u...@googlegroups.com. >> > Visit this group at http://groups.google.com/group/cake-php?hl=en.
thats simple: if you post the form it will keep all the values. so the password is (probably hashed in your controller and) returned back to the view.
an empty string would also result in a long hash.
either way, the password fields should always be empty as default - otherwise you could make them visible input fields right away.
Am Freitag, 9. November 2012 18:22:33 UTC+1 schrieb and:
> Ok friends i have solved the problem.Can I ask you why this problem arises?
> to euromark:I should change the field into the table too because i have > users.password column.What I am doing is only an example to see how cakephp > works.Thank you for the advice.
> Il giorno venerd́ 9 novembre 2012 01:40:24 UTC+1, euromark ha scritto:
>> and if possible use an alias for your form field "password" like "pwd" as >> well as some kind of "pwd_repeat" field to confirm the password (since you >> cant see it very often it is mistyped rendering the registration invalid >> then by accident):
>> http://www.dereuromark.de/2011/08/25/working-with-passwords-in-cakephp/
>> Am Freitag, 9. November 2012 00:33:18 UTC+1 schrieb cricket:
>>> On Thu, Nov 8, 2012 at 4:26 PM, and <andreaes...@gmail.com> wrote: >>> > Hi all, >>> > I have a form for registration and i have some rules that the field >>> must >>> > respect.If i insert the wrong email format,for example,the form says >>> that it >>> > is incorrect.The thing that happen is that the password field is >>> filled with >>> > md5 password.I have the following view:
>>> > <p>Please fill out the form below to register an account.</p> >>> > <?php >>> > echo $form->create('User',array('action'=>'register'));?>
>>> > --- >>> > You received this message because you are subscribed to the Google >>> Groups >>> > "CakePHP" group. >>> > To post to this group, send email to cake...@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> > cake-php+u...@googlegroups.com. >>> > Visit this group at http://groups.google.com/group/cake-php?hl=en.