Questions tagged as 'session'

1
answer

Creating multiple sessions can affect user performance?

My site creates named sessions for each page to be used in requests and stores unique generated tokens each time the page is accessed and other data. Example: $_SESSION['RSD']['page_username_id'] = ... But if you do, open a new browser...
asked by 03.09.2017 / 05:56
2
answers

PHP Check / Drop Login Session Duplication

Is there any tool or something like this to check if the same user's login is occurring in two different places and overturn the oldest login? Example: I am logged on to the system in PHP that uses session for authenticity checking, so anothe...
asked by 16.05.2017 / 16:24
1
answer

Session getting open when I close the browser

I have a user control that stores a list of logged-in users on the system. Together with each user, I keep the id of the session that is logged in. Each session lasts around 20 without the user tinkering with the system. I do not allow the same...
asked by 07.04.2017 / 14:56
1
answer

Print a session variable through the twig engine

I entered a variable in the session named $_SESSION['ano'] . I would like to print your value on a page using twig. I've tried: {% for ano in app.session %} {{ ano }} {% endfor %} But it does not work. How can I do it? The fr...
asked by 23.01.2017 / 14:31
2
answers

Recording data from a SESSION in BD [closed]

Hello, I would like to add the registered_name to the database. <?php require_once("../../../session.php"); require_once("../../../class.user.php"); $auth_user = new USER(); $user_id = $_SESSION['user_session']; $stmt...
asked by 09.01.2017 / 15:45
1
answer

$ _SESSION ["danger / success"] in php to display alerts

LogicaUsuario.php <?php session_start(); function usuarioEstaLogado(){ return isset($_SESSION["usuario_logado"]); }; function verificaUsuario(){ if (!usuarioEstaLogado()){ $_SESSION["danger"] = "Você não tem acesso a essa fu...
asked by 01.12.2016 / 13:46
1
answer

How do I get user id in a session?

I'm doing a project using jsp and servlet, I need when a user logs in, his id is stored in the session, so that with this id, the system knows that this id user is making changes to their (Example, phone change). How could I do that? Control:...
asked by 02.12.2016 / 00:26
1
answer

How can I get an EntityManager from an org.hibernate.Session

Working with hibernate using Session. public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); // A SessionFactory is set up once for an application private static SessionFactory bu...
asked by 11.08.2016 / 15:27
1
answer

Updating session ID for security [closed]

In order for me to keep my session data more secure, I can update the session id on each page, by doing the following: if (!isset($_SESSION)) { session_start(); session_regenerate_id(); } Will this overwhelm the server?     
asked by 01.07.2016 / 02:25
1
answer

Session PHP does not work

I'm starting with PHP and when trying to do a proposed exercise in a workbook, my $ _Session variable is not working as it should, can you tell me what the error in the code is? <?php session_start() ?> <html> <head>...
asked by 11.07.2016 / 16:41