This topic is locked

Hide individual Fields if not logged in or guest

12/7/2019 7:38:10 AM
PHPRunner General questions
M
mhollibush author

To begin,

I am not a PHP pro by any stretch of the imagination.

I purchased PHPRunner with the idea that I could build some database driven sites.

PHPRunner is a AWESOME tool for me or anyone that is a novice. It has been a perfect application for building a basic database driven site.
Here is where I am lost. I have searched throughout the manual and the forums ( I could be searching the wrong term )
I need to hide individual fields if a user is not logged in ( guest mode )
example:

Table "Company"

I need to hide the following field if a user is not logged in or is viewing in guest mode
notes
there are other fields, but if I could get the basic concept, I can do it throughout the view pages

O
Olav 12/7/2019

Use custom view of the table you will restrict. Edit this custom view to fit Guest user. Then in Security add this custom table to Guests, and remove original table for Guest users. Hope this will help you!

Admin 12/7/2019

Custom View will be overkill here, there are two easier options.

  1. If you only need to hide one or two individual fields this article will be perfect for you:

    https://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm
  2. If you need to hide a lot of fields or make other adjustments you can create additional pages in Page Designer for Guest user specifically and restrict access to those pages via User Group Permissions (static or dynamic).

M
mhollibush author 12/7/2019



Custom View will be overkill here, there are two easier options.

  1. If you only need to hide one or two individual fields this article will be perfect for you:

    https://xlinesoft.com/phprunner/docs/hide_controls_on_add_edit_pages.htm
  2. If you need to hide a lot of fields or make other adjustments you can create additional pages in Page Designer for Guest user specifically and restrict access to those pages via User Group Permissions (static or dynamic).


THANK YOU!!!! This is what I am looking for....

here is a question

How is the "guest" session stored?
if ($_SESSION["UserID"]!="user")
What would the "guest" be?

if ($_SESSION["UserID"]!="?????")

Admin 12/10/2019

No need to guess, the manual has it all:

https://xlinesoft.com/phprunner/docs/secapi_isguest.htm