Just to make clear situation:
I have /public_html folder with two websites in public_html/folder01 and public_html/folder2
website folder02 is dedicated to Commercial Representant and website folder 01 is for the management.
Don t ask me why I did two different folders and not a single integrated application. The two projects were just experimenting Wappler and were not intended to go in production but day by day I made the two website working with satisfaction of the users.
The problem: I m making a ticket system where salesmen can open ticket and upload their own files.
The files are uploaded on public_html/folder02/filestorage
IT was working fine but the problem was that people from the management cannot upload their own files in the reply of the ticket, because they should upload on …/folder02/filestorage but file upload do not support uploading in folder out of the website root.
Then before to delete lot of works I try last chance:
On site /folder01 security provider was set as folder01sec while on folder02 was set with folder02sec, different db table but same DB, totally independent.
Then I made a separate login page for management (people of folder01) in folder02, recreating the login file of folder01, same key,name and same tables.
so?
On website folder01 I put a link to the ticket management (done in folder02). User do not understand they switch from folder01 to folder02 and they can upload their files too in folder02/filestorage.
In this way once they login to folder01 website, once redirect on folder02 website they are already logged and no need to login again.
I m sorry for long explanation but I m with mobile, tomorrow will add screenshot.
So, if you recreate same security provider file once you login in one site automatically you are recognized in the second too.
For sure @George will say that this is a great collection of “worste practices” I m the first to say that.
but at the end it worked!