Rectangle 27 0

php Are there performancesecurity issues or benefits when parsing SQL data to JSON to allow a user to login to a website If so, what are they?

Also creating a json file with all the data in user table is not going to be a good practice because it will cause performance problem as you start scaling.

I believe the industrial standard practice is to check the login once (when the user login to the system) and then create a session out of that. And you can store any data related to current login in that session. Every time a server gets a request it will check the session first and if the session is valid it will return back the details required and there is no interaction with the database (By default PHP store the session data in file, you can change to any storage engine as you like) for validating the user.