Merge pull request #32 from IamTaoChen/bug/odic-user

delete user from user_thirds and update README
This commit is contained in:
2024-10-30 19:08:50 +08:00
committed by GitHub
6 changed files with 27 additions and 7 deletions
+6
View File
@@ -441,6 +441,12 @@ func (os *OauthService) UnBindThird(thirdType string, userid uint) error {
return global.DB.Where("user_id = ? and third_type = ?", userid, thirdType).Delete(&model.UserThird{}).Error
}
// DeleteUserByUserId: When user is deleted, delete all third party bindings
func (os *OauthService) DeleteUserByUserId(userid uint) error {
return global.DB.Where("user_id = ?", userid).Delete(&model.UserThird{}).Error
}
// InfoById 根据id取用户信息
func (os *OauthService) InfoById(id uint) *model.Oauth {
u := &model.Oauth{}