S
S
Senbonzakuraa2018-03-04 22:33:22
PHP
Senbonzakuraa, 2018-03-04 22:33:22

How to change the data of an authorized user in sessions without relogin?

The question is in the title. There is authorization by login and password and check for admin:

if ($_SESSION['login'] -> admin === '1'){
 echo('admin');
}

When changing privileges from admin to user, for example, you need a relogin. How to avoid it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Bobkov, 2018-03-05
@Senbonzakuraa

When changing privileges, change their value in the session.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question