in my AdminClass() i tray to add new user from the log-in user , the new user login automatic after i add it ,
i just want to late the admin add user without auto login to this new user.
Thanks
Sorry, I don't understand the question... can you be clearer?
FRANCESCO CROCETTI @ SKARED CREATIONS
Ok
In my App i have
AdminClass(); // the users of this class can add or remove other users
StudentClass();
-when i add new Student from the admin login user (admin in my App not in Combu Web side) the new Student auto login after i add it
exmpale:
StudentUser newStudent = newStudentUser(); newStudent.userName = "Max"; newStudent.password = "1234"; newStudent.Update( (bool success, string error) => { if (success) Debug.Log("Save success: ID " +newStudent.id);
else
Debug.Log("Save failed: " + error);
});
i just want to add this Max Student from the login admin , thats it .
If you mean the records in CB_Session, try to comment the line CB_Account::SetSession($user) in /users.php (should be at line ~341) and it will not create the session record with last login date etc. But besides this, the new accounts are not automatically logged in by the system, the authentication is handled by User.Authenticate and not User.Update so I'm not sure why you say "auto-login" (the user logged in is CombuManager.localUser and you can easily print out its userName in your debug log to see that it's not getting changed after the creation of new users).
FRANCESCO CROCETTI @ SKARED CREATIONS
i figured out the case
public void AddUser()
{
ACMangerUser newUser = new ACMangerUser();
newUser.userName = "Max";
newUser.password = "1234";
newUser.Update( (bool success, string error) => {
// NB: registration does not make the user logged
if (success)
Debug.Log("Save success: ID " + newUser.id);
else
Debug.Log("Save failed: " + error);
});
}
if i'm not login & Authentication as local user i can add user very will AddUser()
but when i login as local user AddUser() Log say
Save failed:
UnityEngine.Debug:Log(Object)
You just tray to test AddUser() when you login & when you not login ,thats it !!
thanks
Try to uncomment the "if" statement that is at top of /users.php (it should be at line 6, after the comment "Deny access to unsecured/non-signed requests").
FRANCESCO CROCETTI @ SKARED CREATIONS
Yes ,now i can add new user from the login user ,
combu is the first & almost only social platform integrate SQL for Unity with simple way ,in my project i can add , edit ,remove users in game play .
Thanks for help every time
Great, all these fixes will be added to the next update. Subscribe to our newsletter, if you didn't yet, to be informed as soon as we release an update to our assets.
FRANCESCO CROCETTI @ SKARED CREATIONS