Ah that makes sense, didnt think to look in plugins. Cheers for the reply!
uplift
Posts
-
Question: What is username:sorted used for? -
Question: What is username:sorted used for?Not sure if this is right category so move to better one if needed.
I was wondering what username:sorted collection is used for? It doesnt appear to be used in the codebase except when adding/removing to/from the sorted set. Also when adding the score of the set its always set to 0 so wont be sorted as I understand it.
-
Question about SSO and username/userslug uniqueness@julian A quick (hacky) test seems to work. Ill have a deeper dive tomorrow and see if I encounter any issues. Thanks for the hook pointer.
-
Question about SSO and username/userslug uniqueness@julian @crazycells Is there a hook (or a place where one could be inserted) in the routing where I could hijack the url params and do some conversion of userslugs?
-
Question about SSO and username/userslug uniqueness@razibal Sounds like we have similar setup but while our profile changes happen outside of Nodebb they also happen outside our website so we don't have a complete list of usernames to check against (unfortunately) otherwise what you describe is the route I would take.
-
Question about SSO and username/userslug uniquenessSo our auth is handled by a third party service provider, so they handle the uniqueness of usernames etc and give us a cookie which we use with the session sharing plugin to create Nodebb accounts using that cookie which populates the Nodebb Username with the Auth Provider Username.
I have a requirement for select groups e.g. internal staff to be able to change their visible username on Nodebb while having the Auth Provider Username still as their main username in their data. This is to prevent Bad Actors harassing users on the third party service.
My initial thought was to create a plugin that hooks in and alters the display name attribute of the user data which would work but the users userslug would still be a slugified version of the Auth Provider Username which would defeat the point of the display name. Could do with a display userslug or a hook in the getDataFromUserSlug methods to convert display user slugs to actual user slugs from a data map in a plugin. Could be a feature request to add such a hook if its considered a good approach?
Another thought was to allow Nodebb username editing but save the Auth Provider Username as a different piece of information on the user data record (for moderation visibility). The issue with this is if someone changes their username for example "A User 123", then a user on the Auth Provider Service joins our site with exactly the same username, then it would clash and cause errors or start adding an extra index to the name which isn't ideal.
Is there anything I'm missing that could do what I'm looking for or does anyone have another approach I can try.