Technology social network

Do I think about the work of social network.

When the user is already registered, and it passes authorization.

If the authorization has passed successfully, its login is saved in the session, and is transmitted to all of the following pages.

and this login is used to appeal to the database ???


Answer 1

As far as I understood the question – yes, just like this. The user is authorized, you write down, for example, its login (you can still something, do not essence) in the session. The bottom line is that authorization confirms the rights of a user and, from the point of view of the code, opens a session of a user.

And then, of course, you can use the data recorded in the session in your databases.