YunShu 559a91e8ee
feat: fix bug that failed to set password after changing username (#2296)
* fix: failed to set password after changing username

When we add a new member to an organization using Casdoor, Casdoor will automatically generate a member with a random username, such as "user_qvducc". When we change the username, for example, to "yunshu", an issue arises where we are unable to successfully edit the password. This is because Casdoor searches for a user based on `owner/username`, and before any changes are saved, the username in the database remains "user_qvducc". However, the frontend uses `orgName/yunshu` instead of `orgName/user_qvducc` to send the request to change the password. As a result, the backend cannot find the user and the password change fails.

* Update user.go

---------

Co-authored-by: hsluoyz <hsluoyz@qq.com>
2023-09-03 00:04:48 +08:00
2023-08-24 23:20:50 +08:00
2023-08-19 16:39:21 +08:00
2023-09-02 18:49:43 +08:00
2023-09-01 01:25:15 +08:00
2023-06-17 11:43:46 +08:00
2023-05-23 17:54:51 +08:00
2023-08-24 22:03:36 +08:00
2023-05-23 17:54:51 +08:00
2023-08-20 00:44:01 +08:00
2020-10-20 21:21:47 +08:00
2023-08-20 00:44:01 +08:00
2023-08-17 14:47:09 +08:00
2022-10-07 19:02:35 +08:00

📦 Casdoor

A UI-first centralized authentication / Single-Sign-On (SSO) platform based on OAuth 2.0 / OIDC.

semantic-release docker pull casbin/casdoor GitHub Workflow Status (branch) GitHub Release Docker Image Version (latest semver)

Go Report Card license GitHub issues GitHub stars GitHub forks Crowdin Discord

Online demo

Documentation

https://casdoor.org

Install

How to connect to Casdoor?

https://casdoor.org/docs/how-to-connect/overview

Casdoor Public API

Integrations

https://casdoor.org/docs/category/integrations

How to contact?

Contribute

For casdoor, if you have any questions, you can give Issues, or you can also directly start Pull Requests(but we recommend giving issues first to communicate with the community).

I18n translation

If you are contributing to casdoor, please note that we use Crowdin as translating platform and i18next as translating tool. When you add some words using i18next in the web/ directory, please remember to add what you have added to the web/src/locales/en/data.json file.

License

Apache-2.0

Description
An open-source UI-first Identity and Access Management (IAM) / Single-Sign-On (SSO) platform with web UI supporting OAuth 2.0, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, RADIUS, Google Workspace, Active Directory and Kerberos
Readme Apache-2.0 67 MiB
Languages
Go 98.9%
HTML 0.4%
Makefile 0.3%
Less 0.2%
Dockerfile 0.1%