[Solar-talk] Working with hashes (MD5) and column updates
Raymond Kolbe
rkolbe at gmail.com
Wed Jan 2 19:22:22 CST 2008
I guess that is the only option then, eh? I did have that in an earlier
version of my project but decided to implement sanitizeMD5 because it seemed
to make sense. I guess I will KISS for the time being ;-)
Thanks Rodrigo
On Jan 2, 2008 4:43 PM, Rodrigo Moraes <rodrigo.moraes at gmail.com> wrote:
> On Jan 1, 2008 2:15 PM, Raymond Kolbe wrote:
> > I noticed that Tipos has encountered the same hash filter issue I have
> as I
> > see a commented line in your model for your hash filter ;-)
>
> Oh, I tried it after our IRC talks, but gave up to continue using what
> I was using before, which is...
>
> In the model:
>
> $this->_calculate_cols[] = 'passwd_confirm';
> $this->_addFilter('passwd', 'validateConfirm');
>
> In the controller:
>
> $data = $request->post('user', array());
>
> if (! empty($data['passwd']) && !empty($data['passwd_confirm'])) {
> // Force hashed values for password comparison.
> $data['passwd'] = hash('md5', $data['passwd']);
> $data['passwd_confirm'] = hash('md5', $data['passwd_confirm']);
> }
>
> No validateHash(), only the code above. It works fine for me.
>
> -- rodrigo
> _______________________________________________
> Solar-talk mailing list
> Solar-talk at lists.solarphp.com
> http://mailman-mail3.webfaction.com/listinfo/solar-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080102/5e719db5/attachment.html
More information about the Solar-talk
mailing list