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

Closed
opened 2025-11-02 04:49:04 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @yanOnGithub on GitHub (Jan 24, 2019).

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

Originally created by @yanOnGithub on GitHub (Jan 24, 2019). Another guy's username is readonly when the admin open the user profile.
GiteaMirror added the type/enhancementissue/duplicate labels 2025-11-02 04:49:04 -06:00
Author
Owner

@lafriks commented on GitHub (Jan 24, 2019):

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

@lafriks commented on GitHub (Jan 24, 2019): It is not possible currently but this should be added to user administration page then
Author
Owner

@yanOnGithub commented on GitHub (Jan 24, 2019):

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

@yanOnGithub commented on GitHub (Jan 24, 2019): Is it sufficient to update user.name and user.lower_name in gitea.db sqlite?
Author
Owner

@lafriks commented on GitHub (Jan 24, 2019):

yes, that should be enaugh

@lafriks commented on GitHub (Jan 24, 2019): yes, that should be enaugh
Author
Owner

@adelowo commented on GitHub (Jan 30, 2019):

Duplicate of https://github.com/go-gitea/gitea/issues/1818

@adelowo commented on GitHub (Jan 30, 2019): Duplicate of https://github.com/go-gitea/gitea/issues/1818
Author
Owner

@mxmehl commented on GitHub (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.

@mxmehl commented on GitHub (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.
Author
Owner

@yanOnGithub commented on GitHub (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?

@yanOnGithub commented on GitHub (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?
Author
Owner

@mxmehl commented on GitHub (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.

@mxmehl commented on GitHub (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.
Author
Owner

@aveao commented on GitHub (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;

@aveao commented on GitHub (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;`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2805