Admin, please help me with this function.

Anhsao

New member
In the template function, there is a đoạn code:
HTML:
{% macro is_login() %}{% set token = get_cookie('token')|default(null) %}{% set user = get_data_by_id('users', 1).data %}{% if user['pass'] == token %}true{% endif %}{% endmacro %}
This function is designed for a single user account to register and log in.
Now I want to build a website that supports multiple users registering and logging in.
How can I do that?
 
Back
Top