A few questions about users

0 votes

Hello 42-ers smiley

I have a few questions about users in the App42 Cloud API:

- is there a way to get the user id of a user? (not the username, but a sequential id or a guid or something that uniquely identifies the user in the system, other than through a readable username)

- if there is no internal user id, are there plans of including it?

- must the username be unique?

- if the username is unique, are there plans to implement a way to either duplicate usernames (for example by adding a user id as asked above)?

- is there a way to use a display name? so my account name is "superplayer", but I want my in-game name to be "Rockstar01". I will login with username "superplayer" and password "super" but everyone sees me as "Rockstar01" and next week I can change to "Rockstar02". Is there such a system in place? If not, are there plans for it?

- is there a way to add custom fields/metadata for users? For example adding a nickname, age (yes I know you can calculate it from a DOB, but it is an example), favorite color and some other social trivia stuff? if not, are there plans for it? (maybe like a hashmap/list of strings and such)

- is there support for teams/clans? And if not are there plans for a team management service? i.e. Rockstar01 is a member of team SuperTeam1337. SuperTeam1337 has 3 memebers. SuperTeam1337 has some info/bio for visitors or an avatar/icon etc.

- is there support for cdkeys or something similar? Like uniquely authenticating an application (maybe, for example, replacing the api private key with a cd key hash/checksum that is unique for each user) per user/device

- how can I add penalties for a player? Rockstart01 harassed somebody. he/she deserves a 6 month ban or something like that (but automatic). Or Rockstar01 can now only play game type X instead of all of them. Is there such a system in place? If not, are there plans for it?

 

Thanks yes

Best regards!

asked Jul 6, 2018 in Unity by xian_ef (35 points)
retagged Jul 23, 2018 by xian_ef

1 Answer

0 votes
 
Best answer

Hi Xian,

Please find the answers inline:

- is there a way to get the user id of a user? (not the username, but a sequential id or a guid or something that uniquely identifies the user in the system, other than through a readable username)

Answer: For us user name is the unique identifier, so you can consider this as user ID.

- if there is no internal user id, are there plans of including it?

Answer: The User Management Module is built considering the user name as a unique identifier and hence it is always advisable to pass some unique id while calling createUser API. We are not assigning any random key to any particular user as his user id considering the fact that it may be hard to remember while login again. If he can create the unique user name by his/her own then it will be easier to remember.

- must the username be unique?

Answer: Yes

- if the username is unique, are there plans to implement a way to either duplicate usernames (for example by adding a user id as asked above)?

Answer: As our Authenticate API uses userName and Password to uniquely identified the user while authenticating the new session to the user, hence two users can not be allowed to have same user name

- is there a way to use a display name? so my account name is "superplayer", but I want my in-game name to be "Rockstar01". I will login with username "superplayer" and password "super" but everyone sees me as "Rockstar01" and next week I can change to "Rockstar02". Is there such a system in place? If not, are there plans for it?

Answer: Yes, you can add metaInfo to the user in a JSON doc which can contain display name. This doc can be modified whenever required and can be fetched along with the user details.

- is there a way to add custom fields/metadata for users? For example adding a nickname, age (yes I know you can calculate it from a DOB, but it is an example), favorite color and some other social trivia stuff? if not, are there plans for it? (maybe like a hashmap/list of strings and such)

Answer: Yes, you can add as explained in above answer

- is there support for teams/clans? And if not are there plans for a team management service? i.e. Rockstar01 is a member of team SuperTeam1337. SuperTeam1337 has 3 memebers. SuperTeam1337 has some info/bio for visitors or an avatar/icon etc.

Answer: As of now, there is no direct API available for team or clans management. However, you can use our Stoage module where you can store the team info in a JSON doc. You can also use our Buddy Services to form a group which you can call it as team. 

- is there support for cdkeys or something similar? Like uniquely authenticating an application (maybe, for example, replacing the api private key with a cd key hash/checksum that is unique for each user) per user/device

Answer: As of now, there is no support for cdkeys available. May be if you could provide some more information on the user case of it then I may be able to suggest some alternatives

- how can I add penalties for a player? Rockstart01 harassed somebody. he/she deserves a 6 month ban or something like that (but automatic). Or Rockstar01 can now only play game type X instead of all of them. Is there such a system in place? If not, are there plans for it?

Answer: You can user lockUser / unlockUser APIs of User Management module to lock or unlock the user account but it can not be done automatically. The APIs need to be called whenever these actions are required. To automate, you can use these APIs in combination with Custom Code APIs.

Let me know if you have any further query, I will be happy to help.
 
Thanks.
answered Jul 9, 2018 by rajeev.etc (1,660 points)
selected Jul 9, 2018 by xian_ef
Thanks for both points. So I need to create the Collection before using it on clients. That's fine, it gives even more control this way.

As for the column, thank you, as I said, it is low prio, so if they think it's a "maybe" they can postpone it until they have more time or whatnot :) It's jsut something for user management. Alternatively, ask them if instead of the column  they might want to add filters (similar to Role filters) for the status as active/locked/deleted users instead. Either one works :)

Thank you!
Another question, related to users but using buddy services. I haven't tried it yet, but I am working on it :)
My question is, if PlayerA sends a request to PlayerB, does the server automatically route the request to B or must B fetch it?
If B must fetch it, how do I know the moment when to fetch? If it is routed automatically, then does this "consume" an API call?
If B accepts A's request, is an automatic response sent to A notifying them that B accepted th friend request? If yes, does it "consume" API calls? If not, how do I detect it? If not, how do I know when to check for acceptance? Periodic fetches?

Regarding Buddy groups, are people already added to it after an API call? Or is it invitation-based where they can reject being added? Meaning A adds B to group G, can B reject the invitation or is B automatically a member of G?

Also, is there a Group management service? I see group creation and adding friends to it, but how do I delete a group or remove players from a group? If I am in a group, how do I leave it?
As we are not establishing any persistent connectivity between server and the client, server can not notify the client regarding a friend request or regarding request acceptance. We have to check it periodically.

Once a user adds a friend to a group, the friend will be added to the group. There are no permission required from the user who is being added to the group.

Regarding removing a group or leaving a group, let me check this with team on adding new API to enhance this feature.
Thank you very much. I think this is needed as it seems weird that someone I added as friend can "move" me around groups randomly and I have no opt-out alternative. If requests cannot be implemented, at least the option to leave a group.
Alternatively I can think of adding someone to a group and they become disruptive and harass members, so they ask me to remove him (but if we are real life friends I won't delete them from my list even if they are an asshole :) ).  So removal is needed too I think.

These are my use-cases. Thank you :)
I noticed the examples had a call for metadata: SetOtherMetaHeaders().
The options I see used are:
- customName (this is unclear to me... is this the name that appears as a "Dear X"? I haven't set-up a mail provider so I can't test)
- emailVerification
- emailAuth
- userProfile
- deletePermanent
- SQL "like" operator

Is there some documentation on this? What other properties do I have besides those?

Also, how can "like" be used? The only examples are some contextual queries of what I input vs what it can find. Are there other operators? "not like" for example? "greater than"? Or only "like"?
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...