Skip to content

silgy_usr_login

Jurek Muszyński edited this page May 13, 2019 · 9 revisions

int silgy_usr_login(int ci)

Description

Logs user in. ci is the connection index passed by the engine to silgy_app_main().

silgy_usr_xxx functions directly read the query string / payload data.

Request must contain the following parameters:

If no USERSBY... compilation switch is present or USERSBYLOGIN is present:

  • login
  • passwd

If USERSBYEMAIL compilation switch is present:

  • email
  • passwd

and optionally:

  • keep

login parameter can contain either login or email. Database lookup is case-insensitive.

Returns

Returns OK or one of the error codes:

  • ERR_INVALID_REQUEST
  • ERR_INVALID_LOGIN
  • ERR_SERVER_TOOBUSY
  • ERR_INT_SERVER_ERROR

Example

See silgy_app_main function in silgy_app.cpp in Toy Facebook project.

Notes

Requires USERS compilation switch.

Clone this wiki locally