[SOLVED] Img verification only for non-registered

no notexa 02 Jul, 2007
Is it possible to have image-verification only for non-registred users ?
If I'm correct this is not by default in there, but if you could point me in the right direction in the code, I can write this myself (I'll post the results here afterwards).<br><br>Post edited by: notexa, at: 2007/07/02 18:15
Gr GreyHead 02 Jul, 2007
Hi Notexa,

At line 36 of chronocontact.php add $my to the global statement.

And around lines 43 and 67 change
if ( trim($paramsvalues->imagever) == 'Yes' ){
to
if ( trim($paramsvalues->imagever) == 'Yes' && !$my->id ){


Not tested but I think it should work.

Bob<br><br>Post edited by: GreyHead, at: 2007/07/02 15:47
no notexa 02 Jul, 2007
Works great. I added
<?php if(!my->id}{ ?>
{imageverification}
<?php } ?>

to the form and now only unregistered users see the verification and are checked.

Maybe something to include in the next version:
Image verification for registered users.

Then you could also have the parser auto remove the tag if the user is registered.
al alessiobonzer 30 Dec, 2008
Hi,
chronoforms.php changed since the question was posted.
Could someone please tell me where (line number) and how (syntax) to declare $my variable?
Thankx a lot in advance.
Ciao
Alessio
Gr GreyHead 30 Dec, 2008
Hi Alessio,

Yes and Joomla changed too. For Joomla 1.5
<?php
$user =& JRequest::getUser();
if ( !$user->id ) { 
?>
{imageverification}
<?php 
}
?>

Bob
This topic is locked and no more replies can be posted.