In web app I have contact form that can be accessed by anonymous users but the problem is when I visit the web app, the contact form is application is being shown instead of login page. I don’t want that I want the login page to be shown for a non logged in user and if he choose to contact us he/she can click the menu to access the contact application.How can I acheive this?
Simply enter login.php from “Generate” → “Start page”, afterwards regenerate ALL the script files again.
- set “Start page” in Generate tab to be function name like “startPage”
- In “Custom Script” > “Global Code” add custom function name “startPage” manually like
function startPage () {
global $Security;
if (!$Security->isLoggedIn()) {
return 'login';
} else {
return 'MonthlyMemberTrafficLightList';
}
}
cmumad wrote:
In “Custom Script” > “Global Code” add custom function name “startPage” manually like
Wrong location. It should be added in Global Code under Server Events → Global → All Pages, and not under Client Scripts or Custom Script as you mentioned above.
Thank you
I did that but I do not want to upload the entire files again , which files should I upload only? is there anything rather than userfn.php?
Unfortunately, you cannot just re-generated the userfn.php file. You need to re-generate ALL the script files again.
The reason for this is, since that startPage will be applied into almost all the generated .php files inside the models and one file named OthersController.php inside the controllers subfolder.