Adam Warski <[email protected]> writes:

> Hello,
>
> I'm integrating recaptcha into a Lift app that uses MegaProtoUser, and 
> there's one small thing that I think can be improved.
>
> There is currently no good place to put the captcha-verifying code. After the 
> signup form is submitted the user if validated using theUser.validate 
> (ProtoUser.scala:386, testSignup method). However I can't put captcha 
> validation into User.validate, as there won't be any captcha when e.g. 
> editing a user.
>
> So I would propose adding a method to MetaMegaProtoUser, e.g.:
>
> protected def validateSignup(user: User) = user.validate
>
> which could be then overridden in concrete user classes.

Can't you just override actionAfterSignup and don't call super if
captcha check fails?

/Jeppe

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

Reply via email to