Hi Bob,
I am adjusting a form to allow both logged in users as well as guests access.
[attachment=0]cf_db_read.png[/attachment]
Issue is that when a public user accesses the form, it lists all data submitted by guest users.
[attachment=1]cf_debug_guest.png[/attachment]
Any suggestions on how to have this custom code which is displayed in the designer tab not show to guest/public users?
[attachment=2]cf_custom_code_designer.png[/attachment]
I am adjusting a form to allow both logged in users as well as guests access.
[attachment=0]cf_db_read.png[/attachment]
Issue is that when a public user accesses the form, it lists all data submitted by guest users.
[attachment=1]cf_debug_guest.png[/attachment]
Any suggestions on how to have this custom code which is displayed in the designer tab not show to guest/public users?
[attachment=2]cf_custom_code_designer.png[/attachment]
Hello mduda,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I ask new users for information and not ask logged in users?
P.S: I'm just an automated service😉
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
How can I ask new users for information and not ask logged in users?
P.S: I'm just an automated service😉
Hi mduda,
Does it work if you change the change the Conditions code like this:
Bob
[[>> Later : fixed missing } <<]]
Does it work if you change the change the Conditions code like this:
<?php
$juser = \JFactory::getUser();
if ( $juser->id > 0 ) {
return array( 'user_id' => $juser->id );
} else {
return array( 'user_id' => '999999' );
}
?>
Bob
[[>> Later : fixed missing } <<]]
When I place the new code into the conditions of the DB Read, it actually pull the entire table to display. When I use the original code (without the 'else'), it pulls only the info entered from the computer/ip.
Any ideas on how to make the 'else' statement return "" ?
Any ideas on how to make the 'else' statement return "" ?
Hi mduda,
Hmmm . . . the 1 = 2 version works in MySQL but apparently not here. I've edited the post, please try the updated version.
Bob
Hmmm . . . the 1 = 2 version works in MySQL but apparently not here. I've edited the post, please try the updated version.
Bob
Hi mduda,
Please turn on the Debugger and post the output here - I'm looking for the MySQL query that is created with this as the WHERE clause. it should be WHERE `user_id` = '999999' or something similar.
Bob
Please turn on the Debugger and post the output here - I'm looking for the MySQL query that is created with this as the WHERE clause. it should be WHERE `user_id` = '999999' or something similar.
Bob
Wooohooo! Thanks so much Bob! It's working🙂 Used your code...added the '}' after the second return array, and all is good!!! You rock:)
This topic is locked and no more replies can be posted.