Fixed authUser to user link #358
This commit is contained in:
@@ -494,8 +494,14 @@ class AuthService(AuthServiceABC):
|
||||
added_user = True
|
||||
|
||||
db_user = self._auth_users.get_auth_user_by_email(user_dto.email)
|
||||
if db_user.users.count() == 0:
|
||||
members.for_each(lambda x: self._auth_users.add_auth_user_user_rel(AuthUserUsersRelation(db_user, x)))
|
||||
|
||||
auth_user_relation_ids = self._auth_users.get_auth_user_relation_ids(db_user)
|
||||
|
||||
for user in db_user.users:
|
||||
if user.id in auth_user_relation_ids:
|
||||
continue
|
||||
|
||||
self._auth_users.add_auth_user_user_rel(AuthUserUsersRelation(db_user, user))
|
||||
|
||||
if db_user.confirmation_id is not None and not added_user:
|
||||
raise ServiceException(ServiceErrorCode.Forbidden, "E-Mail not verified")
|
||||
|
Reference in New Issue
Block a user