I want to design a system to interface with OJS database

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.

Steps I took leading up to the issue

What application are you using?
OJS 3.4.0-4

Additional information

Did you have a look at the REST API: https://docs.pkp.sfu.ca/dev/api/ojs/3.4 ?

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. :smiley:

I see. I think then it is better to base your solution on an external identity provider for synchronising user accounts across applications: https://docs.pkp.sfu.ca/admin-guide/3.3/en/single-signon

Just redirect the registration and login to OJS with the source parameter pointing to your new interface

Ex: ojs_url/login?source=/your_new_app/do_something

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";