Monday, January 25, 2010

Validate from array question

When a user signs up i want to ensure the name/slug they choose will not
conflict with the app so I list all my controllers and action and end up
with an array like:

Array
(
[Company] => Array
(
[1] => index
[2] => about
)

[Managers] => Array
(
[1] => add
[2] => edit
[3] => delete
[4] => index
)

...so on it goes thru every controller

So a user enters a "slug" when registering how can I ensure its not a
controller name or an action based on the array above.

Or is there an easier way. I took out my ACL where I was validating against
the DB of all the actions so I have to find a new method.

Thanks,

Dave

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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

No comments: