Describe the issue or problem
I want to design a system to interface with OJS database. Because I want to log in to the system directly using the OJS account and password, I would like to ask how the OJS user’s password is stored in the database? Thank you.
Thank you for your help. In fact, I want to design a conference registration system, and I want to use the account and password directly on the OJS system. This way users don’t have to apply again. I’ve looked at the REST API, but I can’t seem to find what I want. Thank you.
And on your new system just use the session_cookie_name (default is OJSSID) to get the current user. Something along these lines:
$sid = $_COOKIE['OJSSID'];
$sql = "SELECT GROUP_CONCAT(r.role_id) AS roles, u.*
FROM sessions AS s
INNER JOIN users AS u ON (s.user_id = u.user_id)
INNER JOIN roles AS r ON (s.user_id = r.user_id AND r.journal_id = 1)
WHERE s.session_id = '".escape_function($sid)."' AND s.user_id IS NOT NULL GROUP BY s.user_id";