Problem connecting to restricted rooms after changing player username
Hi, I have a problem when one of the players change their photon username. From that moment on, they will not be able to connect to the rooms they should join.
The rooms are restricted by username and a totally new room is generated in each play.
If the user keeps using the same username, then he can play so much matches as he wants. But just changes the username and then he keeps receiving "OperationResponse 226: ReturnCode: 32765 (Game full)".
However, I check the number of users in the room from the other end calling the server for information, and has been created for 2 and only has 1 user waiting inside.
I double checked both usernames were correct after the user changes it. When this happens, I can only connect with this new username if I turn off and on the application.
Any idea about what could be the problem?
Best regards.
0
Best Answer
-
Hi @manoloman,
Thank you for choosing Photon!
We now recommend having unique UserID per player.
You have different options:
- cache userID locally between sessions where rooms could be rejoined.
or
- use a login/signup system parallel to Photon and set the UserId from the client before connecting.
or
- use unique device ID as UserId (or something similar)
or
- [recommended] use custom authentication to set UserID from the server. (PlayFab is our partner, has a good free plan)5
Answers
-
Hi @manoloman,
Thank you for choosing Photon!
We now recommend having unique UserID per player.
You have different options:
- cache userID locally between sessions where rooms could be rejoined.
or
- use a login/signup system parallel to Photon and set the UserId from the client before connecting.
or
- use unique device ID as UserId (or something similar)
or
- [recommended] use custom authentication to set UserID from the server. (PlayFab is our partner, has a good free plan)5 -
Thanks for the recommendations. I will try to apply one of them to solve our problem.
Best regards.0