Skip to content

How can the admin change another guy's username? #5822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yanOnGithub opened this issue Jan 24, 2019 · 8 comments
Closed

How can the admin change another guy's username? #5822

yanOnGithub opened this issue Jan 24, 2019 · 8 comments
Labels
issue/duplicate The issue has already been reported. type/enhancement An improvement of existing functionality

Comments

@yanOnGithub
Copy link

Another guy's username is readonly when the admin open the user profile.

@lafriks lafriks added the type/enhancement An improvement of existing functionality label Jan 24, 2019
@lafriks
Copy link
Member

lafriks commented Jan 24, 2019

It is not possible currently but this should be added to user administration page then

@yanOnGithub
Copy link
Author

Is it sufficient to update user.name and user.lower_name in gitea.db sqlite?

@lafriks
Copy link
Member

lafriks commented Jan 24, 2019

yes, that should be enaugh

@adelowo
Copy link
Member

adelowo commented Jan 30, 2019

Duplicate of #1818

@techknowlogick techknowlogick added the issue/duplicate The issue has already been reported. label Jan 30, 2019
@mxmehl
Copy link

mxmehl commented Apr 1, 2019

For future reference, it is also necessary to rename the folder of the user in gitea's ROOT path, otherwise the links on the profile page break.

@yanOnGithub
Copy link
Author

yanOnGithub commented Apr 2, 2019

gitea's ROOT path

What do you mean by ROOT path? Do you mean the gitea-repositories folder? or the GITEA_HOME folder?

@mxmehl
Copy link

mxmehl commented Apr 2, 2019

What do you mean by ROOT path? Do you mean the gitea-repositories folder? or the GITEA_HOME folder?

The former. In app.ini, it's defined as ROOT inside the [repository] section. This directory contains one folder per user/organisation, and this is the one you'll have to rename.

@aveao
Copy link

aveao commented Nov 16, 2020

For further future reference, you'll also want to update user's repositories to point to the right owner_name.

This is what we had to do to move a user (other than also moving the directory):
UPDATE public.user SET name = 'newname', lower_name = 'newname' WHERE name = 'oldname';
UPDATE public.repository SET owner_name='newname' WHERE owner_id=123;

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/duplicate The issue has already been reported. type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

6 participants