Only allow user to change username if it is unique and does not contain profanity?
-
Was following the tutorial over at bootcamp episode
but a couple things came up.
- It looks like users can have overlapping display names / usernames correct? Is there a way to disable this behavior so that users will get an error if a name is taken?
- Can we implement a profanity filter on usernames?
-
Hi Kuabs,
Assuming your app isn't otherwise using UniversalIds -- you can use what we call a Non-login Universal Id for this purpose.
This utilizes our UniversalId concept - which is basically just a unique username for the user. But disables it for login purposes.
You use this call to attach one: https://docs.braincloudservers.com/api/capi/identity/attachnonloginuniversalid
I'd do it via cloud code script - and once an id has been successfully attached - automatically update the user's name to match that universalId. (Basically - we're piggybacking on the universalId to make it unique).
Hope that helps!
Paul.
-
For a lot of games a unique username (other than the profile name, a unique display name) is a bare minimum requirement. @Paul-Winterhalder Has this use case been solved?
I see this post from 2021 https://forums.getbraincloud.com/topic/119/unique-field-for-a-custom-entity but unfortunately its not a solution -
Hi Kuabs,
Assuming your app isn't otherwise using UniversalIds -- you can use what we call a Non-login Universal Id for this purpose.
This utilizes our UniversalId concept - which is basically just a unique username for the user. But disables it for login purposes.
You use this call to attach one: https://docs.braincloudservers.com/api/capi/identity/attachnonloginuniversalid
I'd do it via cloud code script - and once an id has been successfully attached - automatically update the user's name to match that universalId. (Basically - we're piggybacking on the universalId to make it unique).
Hope that helps!
Paul.
-
@Paul-Winterhalder Amazing! This is perfect for my needs-- thanks so much Paul.
-