Get Account By Login
GetAccountByLogin¶
Retrieves account information by the specified login.
int GetAccountByLogin(int login, AccountRecord* account);
Parameters¶
- login — integer representing the account login ID.
- account — pointer to an AccountRecord structure where the retrieved account data will be stored.
Return Value¶
RET_OK— account found, data successfully retrieved.RET_NOT_FOUND— account with the specified login does not exist.RET_*— other error codes.- Return Codes
Example¶
AccountRecord acc;
if (GetAccountByLogin(1001, &acc) == RET_OK) {
// Use data from acc
}
Warning
- The
accountpointer must point to a valid, pre-allocatedAccountRecordstructure. - If an error occurs, the data in
accountmay be invalid — always check the return code.