Hi there, is there a way to disable the image verification if a user is logged in ?
I made a form to submit content by email and would like to use the imageverification function for the users non logged to avoid spam, but I would like to diable this function if it's a known user (logged in)
Thanx for your help !!!
Hi,
This should be possible, but takes some creative coding to make it work.
The approach would be to disable the image verification, and manually add the code for the verification image (copy and paste from a form with im.ver. enabled?). Next step would then to use the serverside validation code. Fetch the current user's object (JFactory::getuser()), and test the id-propery for 0. If it is 0, test the md5-hash of the verification code against the hash stored in the session object.
I'm currently on a mobile client, but I'll see about some code examples later in the evening. Otherwize, you'll find the different bits and pieces lurking in the ChronoForms sourcecode.
/Fredrik
Wow... thanx for your help !
But that's chineese to me am afraid...
If it's that difficult then users will have to type the imageverification code then !
Hi jeromebg,
There's another possibility which may be simpler. You can make a copy of your form (Form 2) and remove the Imageverification. Then at the beginning of Form 1 check if the user is logged in and, if they are redirect them to Form 2.
Similarly at the beginning of Form 2 redirect any un-logged in users over to Form 1.
Bob