Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Users accesing only info about their location (Read 2401 times) previous topic - next topic

Users accesing only info about their location

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

Re: Users accesing only info about their location

Reply #1
i am also in need of the same solutions please email me at peterjohn@zuhalearn.com if solution has been found

Re: Users accesing only info about their location

Reply #2
Did you already try User Record management?


Re: Users accesing only info about their location

Reply #4
@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 questions

1) how do i integrate a custom code, and functions as well as libraries ? see example of code below
2) how to i create an SMPP connection to phpRAd
3) I was able to to filter by location but the record counts that i put on the dashboards where not filtering according to the location
4) 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!!!!


 

Re: Users accesing only info about their location

Reply #5
@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).