After doing the "session", how do I bring the user information logged in? I know it's not just creating a session, I need to bring user information like Name / Nickname, avatar, email etc.
After doing the "session", how do I bring the user information logged in? I know it's not just creating a session, I need to bring user information like Name / Nickname, avatar, email etc.
You can make a select in your database by retrieving the user information and so you could set the object or a variable of the form you prefer containing the user in a session like this: $_SESSION['usuario'] = $usuario
and access is almost same way:
$usuario = $_SESSION['usuario']
$usuario->getNome();
$usuario->getEmail();
In this example I do as if I were set the object of a user within session and I am getting its attributes through the get methods of that object. if you do not put the object of a user in the session and do not know how to access just just give var_dump($variavel)
and have a better view about your variable