diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/models/user.go b/models/user.go index 0c445b5afd..90ca189ef0 100644 --- a/models/user.go +++ b/models/user.go @@ -943,17 +943,6 @@ func ChangeUserName(u *User, newUserName string) (err error) { return fmt.Errorf("ChangeUsernameInPullRequests: %v", err) } - // Delete all local copies of repository wiki that user owns. - if err = x.BufferSize(setting.IterateBufferSize). - Where("owner_id=?", u.ID). - Iterate(new(Repository), func(idx int, bean interface{}) error { - repo := bean.(*Repository) - RemoveAllWithNotice("Delete repository wiki local copy", repo.LocalWikiPath()) - return nil - }); err != nil { - return fmt.Errorf("Delete repository wiki local copy: %v", err) - } - // Do not fail if directory does not exist if err = os.Rename(UserPath(u.Name), UserPath(newUserName)); err != nil && !os.IsNotExist(err) { return fmt.Errorf("Rename user directory: %v", err) |