mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-03 03:59:12 +00:00
Fix User Startup Email (#14183)
This commit is contained in:
parent
f7a4a67834
commit
c6110a3bc8
@ -76,8 +76,9 @@ public final class UserUtil {
|
|||||||
if (authProvider.equals(AuthProvider.BASIC)) {
|
if (authProvider.equals(AuthProvider.BASIC)) {
|
||||||
if (originalUser.getAuthenticationMechanism() == null
|
if (originalUser.getAuthenticationMechanism() == null
|
||||||
|| originalUser.getAuthenticationMechanism().equals(new AuthenticationMechanism())) {
|
|| originalUser.getAuthenticationMechanism().equals(new AuthenticationMechanism())) {
|
||||||
updateUserWithHashedPwd(updatedUser, getPassword());
|
String randomPwd = getPassword();
|
||||||
EmailUtil.sendInviteMailToAdmin(updatedUser, ADMIN_USER_NAME);
|
updateUserWithHashedPwd(updatedUser, randomPwd);
|
||||||
|
EmailUtil.sendInviteMailToAdmin(updatedUser, randomPwd);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
updatedUser.setAuthenticationMechanism(new AuthenticationMechanism());
|
updatedUser.setAuthenticationMechanism(new AuthenticationMechanism());
|
||||||
@ -100,8 +101,9 @@ public final class UserUtil {
|
|||||||
updatedUser = user(username, domain, username).withIsAdmin(isAdmin).withIsEmailVerified(true);
|
updatedUser = user(username, domain, username).withIsAdmin(isAdmin).withIsEmailVerified(true);
|
||||||
// Update Auth Mechanism if not present, and send mail to the user
|
// Update Auth Mechanism if not present, and send mail to the user
|
||||||
if (authProvider.equals(AuthProvider.BASIC)) {
|
if (authProvider.equals(AuthProvider.BASIC)) {
|
||||||
updateUserWithHashedPwd(updatedUser, getPassword());
|
String randomPwd = getPassword();
|
||||||
EmailUtil.sendInviteMailToAdmin(updatedUser, ADMIN_USER_NAME);
|
updateUserWithHashedPwd(updatedUser, randomPwd);
|
||||||
|
EmailUtil.sendInviteMailToAdmin(updatedUser, randomPwd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user