Re: Can someone explain why this happens

2008-12-22 Thread AD7six



On Dec 22, 3:34 am, gearvOsh mileswjohn...@gmail.com wrote:
 So I have an action that verifies an email address after a successful
 signup. It uses a hash that was given in the email sent out.

 function verify($hash = '') {

 }

 This is my test hash and the url becomes: /users/verify/
 eac20adf536b50f9fc0be58550fde763

 When I go to that page, and even without submitting a form or doing
 any data checking, this query is ran.

 SELECT COUNT(*) AS `count` FROM `users` AS `User` WHERE `User`.`id` =
 'eac20adf536b50f9fc0be58550fde763'

 Why is it grabbing the hash from the controller action and running a
 query when no interaction is made?

Because most of the time the first parameter is the id, and cake sets
that for you automatically ( I would have thought from your previous
thread you'd have picked that up already ;) ).

AD
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can someone explain why this happens

2008-12-22 Thread gearvOsh

Ah I came to that assumption last time, but then I had random
instances where the hash wasnt being used as the id so I got confused.

Anyway, would I just leave it? Or put an ($id = null, $hash = '')?
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Can someone explain why this happens

2008-12-21 Thread gearvOsh

So I have an action that verifies an email address after a successful
signup. It uses a hash that was given in the email sent out.

function verify($hash = '') {
}

This is my test hash and the url becomes: /users/verify/
eac20adf536b50f9fc0be58550fde763

When I go to that page, and even without submitting a form or doing
any data checking, this query is ran.

SELECT COUNT(*) AS `count` FROM `users` AS `User` WHERE `User`.`id` =
'eac20adf536b50f9fc0be58550fde763'

Why is it grabbing the hash from the controller action and running a
query when no interaction is made?
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Can someone explain why this happens

2008-12-21 Thread Sam Sherlock
I am not sure what code you have in your verify action, but I would have two
actions verify and confirm

the verify would make a link to the comfirm action.

Verify would check that the hash is associated with an inactive account

Confirm set the coresponding account to active

2008/12/22 gearvOsh mileswjohn...@gmail.com


 So I have an action that verifies an email address after a successful
 signup. It uses a hash that was given in the email sent out.

 function verify($hash = '') {
 }

 This is my test hash and the url becomes: /users/verify/
 eac20adf536b50f9fc0be58550fde763

 When I go to that page, and even without submitting a form or doing
 any data checking, this query is ran.

 SELECT COUNT(*) AS `count` FROM `users` AS `User` WHERE `User`.`id` =
 'eac20adf536b50f9fc0be58550fde763'

 Why is it grabbing the hash from the controller action and running a
 query when no interaction is made?
 


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---