Quantcast

Confirm Password

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Confirm Password

Dave Maharaj :: WidePixels.com
I can not get my confirm passwords to match.
 
I have:
$this->data['User']['password_confirm'] = Security::hash($this->data['User']['password_confirm']) ;
 
but when I debug
debug($this->data['User']['password_confirm']) ;
debug($this->data['User']['password']) ;
 
both come back different even though i just enter 123 for both.
 
Am i missing something?
 
Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confirm Password

d1ve blu3


On Tue, Jul 14, 2009 at 10:09 AM, Dave Maharaj :: WidePixels.com <[hidden email]> wrote:
I can not get my confirm passwords to match.
 
I have:
$this->data['User']['password_confirm'] = Security::hash($this->data['User']['password_confirm']) ;
 
but when I debug
debug($this->data['User']['password_confirm']) ;
debug($this->data['User']['password']) ;
 
both come back different even though i just enter 123 for both.
 
Am i missing something?
 
Dave

Maybe they use different encryption, ex md5 and sha1?

SOL


--
"One of the mankind greatest enemy is man itself"
-Gendo Ikari

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confirm Password

M Naveed Akram
In reply to this post by Dave Maharaj :: WidePixels.com
Hey you might be using auth component.. so you need to use $this->Auth->password(); to hash your confirm password.. and your password field is automatically hashed using this function

On Tue, Jul 14, 2009 at 8:09 AM, Dave Maharaj :: WidePixels.com <[hidden email]> wrote:
I can not get my confirm passwords to match.
 
I have:
$this->data['User']['password_confirm'] = Security::hash($this->data['User']['password_confirm']) ;
 
but when I debug
debug($this->data['User']['password_confirm']) ;
debug($this->data['User']['password']) ;
 
both come back different even though i just enter 123 for both.
 
Am i missing something?
 
Dave




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Confirm Password

thatsgreat2345

Yeah the reason they come back different is a field named ['AuthModel']
['password'] is automatically hashed, but when you hash with Security
it uses something else. so use $this->Auth->hashPasswords which you
can check out more in the book here
http://book.cakephp.org/view/247/AuthComponent-Methods

On Jul 13, 10:42 pm, M Naveed Akram <[hidden email]> wrote:

> Hey you might be using auth component.. so you need to
> use $this->Auth->password(); to hash your confirm password.. and your
> password field is automatically hashed using this function
>
> On Tue, Jul 14, 2009 at 8:09 AM, Dave Maharaj :: WidePixels.com <
>
> [hidden email]> wrote:
> >  I can not get my confirm passwords to match.
>
> > I have:
> > $this->data['User']['password_confirm'] =
> > Security::hash($this->data['User']['password_confirm']) ;
>
> > but when I debug
> > debug($this->data['User']['password_confirm']) ;
> > debug($this->data['User']['password']) ;
>
> > both come back different even though i just enter 123 for both.
>
> > Am i missing something?
>
> > Dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...