Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after username change. #86

Open
leedavi opened this issue Sep 30, 2023 · 6 comments
Open

Error after username change. #86

leedavi opened this issue Sep 30, 2023 · 6 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed sponsors welcome The effort required would make a sponsor the ideal approach to closing this issue.

Comments

@leedavi
Copy link

leedavi commented Sep 30, 2023

Upendo.UserManager_01.01.01_Install.zip

With a user that was created before I installed the module. I edited the username to another name and saved. The below error appear, after I refreshed the module continued to work normal and the username was changed.

NOTE: The reason I needed to change the username was because it was a email and although I was certain of the password and certain the user did work before, the email login did not let me in. (The might be a DNN thing. I was playing in a dev system.)

image

@leedavi
Copy link
Author

leedavi commented Sep 30, 2023

Correction, the module did not change the username and every time I enter the user I get the error.

@leedavi
Copy link
Author

leedavi commented Sep 30, 2023

The user exists in the DNN user list, but throws a "not found" error when you try and edit it.
I deleted the user from the DB and then created a new user with a new email as the username.
Then did the same operation, changed the username and the same error appear.
I have "use email as username" turned off.

@WillStrohl
Copy link
Contributor

We'll try to get to this at some point in the future. At this point, I'm not sure it will be any time soon. Someone else may want to do a PR. We've already donated a TON of time to build this. :)

@WillStrohl WillStrohl added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed sponsors welcome The effort required would make a sponsor the ideal approach to closing this issue. labels Oct 11, 2023
@jeremy-farrance
Copy link
Contributor

@leedavi - what version of DNN?

@WillStrohl, I may tackle this. But, any chance you know the DNN code and might be able to confirm for me that it is necessary to call UserController.ChangeUsername separate of UpdateUser()? If not, do you know anyone still in the DNN community that knows this stuff that I could reach out to with a question or two?

I didn't walk it down to the SQL to see what is going on, but I thought PB would be a good guide for the steps; so, looking at the PersonaBar Components as guide, it looks like there are quite a few rules to check on along the way that User Manager's current UserManage.EditUser() is just not doing. (E.g. if DNN setting is Use email as username, then some checks need to happen).

Also, note to self: I confirmed this in DNN v9.11.02 and v9.13.00 and also in our custom User Manage 1.9.x, same issue.

@leedavi
Copy link
Author

leedavi commented Oct 26, 2023

I think it was DNN v9.11 when I tried it.

@WillStrohl
Copy link
Contributor

@jeremy-farrance I haven't checked that method in a while, personally, but that's the approach I'd first take to accomplish this update. Use the API whenever necessary. If it doesn't do what you expect, see if you can do something just before/after the call to the method to address the issue. (For example, I've once had to implement a routine for a specific security role update in the past that updated it twice due to some oddity DNN was doing.) Updating this kind of thing in SQL would be an absolutely last resort, in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed sponsors welcome The effort required would make a sponsor the ideal approach to closing this issue.
Projects
None yet
Development

No branches or pull requests

3 participants