Users accesing only info about their location June 18, 2019, 07:29:57 PM Hello,I am building an application that needs certain profiles to access only information from their location.This location is in a field on the users table and is called id_location. So all users except the Admin profile have an id_location.Now the questions are:How do I access this value in all pages in order to validate if the user is an admin so that user can see all records, but the other users can only see the record on their specific location?When I have that value about their location, how do I modify the query in order to bring only their location records?How do I redirect users that have no access to a certain page to another? For example: If I have a table called Stores and I dont want a user with level Teller to access the Add Page but a new page called Add Page Teller how do I do it?Thank you for the help.Regards,Zolwito Quote Selected
Re: Users accesing only info about their location Reply #1 – December 17, 2019, 12:15:57 PM i am also in need of the same solutions please email me at peterjohn@zuhalearn.com if solution has been found Quote Selected
Re: Users accesing only info about their location Reply #2 – December 19, 2019, 08:25:40 AM Did you already try User Record management? Quote Selected
Re: Users accesing only info about their location Reply #3 – December 19, 2019, 12:34:24 PM @peterjohn what @tin showed you is what I explain to you in your other related topic 👉here. Quote Selected
Re: Users accesing only info about their location Reply #4 – December 20, 2019, 01:33:35 PM @tin and Willvin thank you so much i tried it and it did work. i will be even more grateful if you could help me with the following.Scenario i am creating an application which is going to be integrated with an SMS connection via an SMPP v3.4. users send an SMS to a given number (shortcode) and this number is validated using a luhn algorithm. Apart from sending SMS's the system has a field on the dashboard for entering these code.here are my questions1) how do i integrate a custom code, and functions as well as libraries ? see example of code below2) how to i create an SMPP connection to phpRAd3) I was able to to filter by location but the record counts that i put on the dashboards where not filtering according to the location4) the export to excel function does not seem to work. it returns an error message that the file format and extension don't match i have attached a sample code of the luhn algorithm that was used for validation of the codes entered into the system. please help!!!! Quote Selected Last Edit: December 20, 2019, 01:40:31 PM by peterjohn
Re: Users accesing only info about their location Reply #5 – December 25, 2019, 10:21:35 AM @peterjohn 1. check my youtube channel for a video called integrating full calendar, you would see an example of how to add custom code.3. you need to edit the SQL to suit your needs. By using the where statement to filter depending on the current user location (e.g SELECT COUNT(*) FROM {table} WHERE location.location = user.location). Quote Selected