mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-05 23:36:09 +00:00
forward user's role on login
This commit is contained in:
@@ -18,6 +18,7 @@ std::string PublicKey;
|
||||
std::string PrivateKey;
|
||||
extern bool LoginAuth;
|
||||
extern std::string Username;
|
||||
extern std::string UserRole;
|
||||
std::string Role;
|
||||
|
||||
void UpdateKey(const char* newKey){
|
||||
@@ -69,6 +70,9 @@ std::string Login(const std::string& fields){
|
||||
if (d.contains("username")) {
|
||||
Username = d["username"].get<std::string>();
|
||||
}
|
||||
if (d.contains("role")) {
|
||||
UserRole = d["role"].get<std::string>();
|
||||
}
|
||||
if(d.contains("private_key")) {
|
||||
UpdateKey(d["private_key"].get<std::string>().c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user