mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-18 00:19:49 +01:00
fix: only update name if not undefined
This commit is contained in:
parent
063a18793c
commit
bb47c19d4d
@ -281,7 +281,7 @@ class UserService {
|
|||||||
try {
|
try {
|
||||||
user = await this.store.getByQuery({ email });
|
user = await this.store.getByQuery({ email });
|
||||||
// Update user if autCreate is enabled.
|
// Update user if autCreate is enabled.
|
||||||
if (user.name !== name) {
|
if (name && user.name !== name) {
|
||||||
user = await this.store.update(user.id, { name, email });
|
user = await this.store.update(user.id, { name, email });
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user