Skip to content
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

Possibility to change the username in admin user view or by themselfs #6984

Closed
ghost opened this issue Jan 28, 2014 · 38 comments
Closed

Possibility to change the username in admin user view or by themselfs #6984

ghost opened this issue Jan 28, 2014 · 38 comments

Comments

@ghost
Copy link

ghost commented Jan 28, 2014

Hi,

Some users of my cloud are using their emailadress as usernames. Because some users changed their primary emailaccounts they want to change their username in owncloud also. Could you make it possible for the users to change their usernames - or that the admin can change it?

Thank you and keep up the great work!

@ghost ghost closed this as completed Jan 28, 2014
@ghost ghost reopened this Jan 28, 2014
@Bugsbane
Copy link

I'm looking for this functionality, too.

@Wikinaut
Copy link
Contributor

+1

@enboig
Copy link

enboig commented Oct 23, 2014

+1

I have done a look to the database and I think a possible roadmap to add this could be:

  1. add "id" field to users table, make it primary key (and auto numeric) and make "uid" field "unique".
  2. change all core functions so they identify users by id and not by uid.
  3. add the option to change usernames, but also make an option to disable it so "legacy/old" 3rd party apps continue to work.

@enboig
Copy link

enboig commented Oct 23, 2014

Maybe a "less traumatic" approach would be adding a "username" field, and just change validation functions and user edit functions to use it. The big headache here would be how to build a upgrade path for existing installations.

@ghost
Copy link
Author

ghost commented Nov 11, 2015

I’m closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on for so long, then it seems no one has the time to implement this.

Please reopen if you still encounter this issue with the latest stable version and then please use the issue template. You can also contribute directly by providing a patch – see the developer manual. :)

Thank you!

@ghost ghost closed this as completed Nov 11, 2015
@Wikinaut
Copy link
Contributor

Please reopen. The issue is still valid.

@Wikinaut Wikinaut reopened this Nov 11, 2015
@i68040
Copy link

i68040 commented Feb 6, 2016

+1

@stevejordi
Copy link

+1 URGENT...
This is a basic functionality...

@blizzz blizzz added this to the backlog milestone Feb 22, 2016
@stevejordi
Copy link

This is not only philosophical but a real necessity.
When accounts are automatically created via an LDAP connection, then, if someone gets married/divorced and change his/her name, this will automatically create a new empty account.
Moving the content of the former directory + rescan won't help as all shared links will be lost.
We have 4,500 users and can't manually manage the rename process with SQL commands after reverse engineering the database schema (which I'm not even confident with). All this on a production environment.

@blizzz
Copy link
Contributor

blizzz commented Mar 18, 2016

Requires #21282

@karlitschek
Copy link
Contributor

usernames can't be changed because they are used in a lot of places in the DB, filesystem, logfiles and external systems/references. This can't be done.

The way to go is to see usernames as what they are. Internal references only that should be invisible to the users.
I fact the only place where they are currently still visible is the login form. In the near future we will support login via email so this will be done too.

@stevejordi
Copy link

Well,
I couldn't disagree more.

Usernames are not only visible in login. They are on the file system, they are spread tens of times in the database.
That means the database is poorly designed as the username is used as an index. Indexes should never carry
any kind of information whatsoever. Worse: it's used as an index now and then, when sometimes, it's used with
a record id (which should be the only way)
An index that is just autoinc would solve the problem: you change the username in one place and keep the same
recordID and it'd done. The unique identifier can be managed internal without effect on the end-user, no matter
how many times (s)he changes names.

Switching to email in the future will just prove as inefficient as currently since emails also carry information.
Maria.Doe@... gets married and her email changes into Maria.Stewart@... then we start again, the entire login
process will create a new empty environment?

If we had a real Database diagram with all indexes, that could help setup a 3rd party solution.
And switching to email as login, will you provide a migration tool?

I just spent a full week trying to reverse engineer the database to provide our admins a way to rename users.
We have user renaming every week, so since we have put owncloud into production we have a lot of people now that
have lost every link they shared with others. For entire departments, we can't just answer "we can't change your name"

The decision has now been made to fully abandon the product whereas we were evaluating getting the
professional licence a couple of months ago. But this specific problem is just something no-one believes could not be done.

I am the one recommending the product to our institution (4500 users) but have now been charged in finding
an alternative. That's too bad. As I already did this in the past, and ownCloud was the most promising and
matching our needs. But this rename thing is so basic that it slipped my mind during the test process. My mistake.

Steve

On Mar 19, 2016, at 22:30, Frank Karlitschek [email protected] wrote:

usernames can't be changed because they are used in a lot of places in the DB, filesystem, logfiles and external systems/references. This can't be done.

The way to go is to see usernames as what they are. Internal references only that should be invisible to the users.
I fact the only place where they are currently still visible is the login form. In the near future we will support login via email so this will be done too.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #6984 (comment)

@karlitschek
Copy link
Contributor

again. Why do you insist to rename the username when no end-user actually sees it? This is an internal idea where a lot of things break if you play with it. Do you mixup displayname with username?

@stevejordi
Copy link

When Maria A works with ownCloud, everything is in the Maria_A folder.

She gets married, and is named Maria_B. The next time she logs in via LDAP, she has to type in Maria B as the username. She has no choice at all, Maria A doesn't work anymore.

This will be seen as the first login and will therefore create a NEW EMPTY environment, in Maria_B.
She doesn't have access to the content of Maria_A anymore.

If, as a sysadmin, we move the files from Maria_A to Maria_B, and force a rescan, she will be able to see the files.
But ALL the shared links are lost.

The display name is not important, we don't care at all about it.

Steve

On Mar 20, 2016, at 17:19, Frank Karlitschek [email protected] wrote:

again. Why do you insist to rename the username when no end-user actually sees it? This is an internal idea where a lot of things break if you play with it. Do you mixup displayname with username?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #6984 (comment)

@karlitschek
Copy link
Contributor

As said before the solution for that is to enable login via email which can be changed anytime.

@stevejordi
Copy link

As I said before, how to we switch 4500 existing accounts to email login without losing anything?
Is there a migration tool to take care of that?

And as I said before, what happens when the email changes?
maria.a@... becomes maria.b@...

Isn't it just reproducing the same problem? How will the existing account be linked to the two email? Historically?

If it works, then fine if we can move 4500 accounts.

On Mar 20, 2016, at 17:37, Frank Karlitschek [email protected] wrote:

As said before the solution for that is to enable login via email which can be changed anytime.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #6984 (comment)

@karlitschek
Copy link
Contributor

login with email will be an option 9.1 automatically without the need to change anything.
emails can be changed manually or via ldap at any time

@stevejordi
Copy link

It's too late for us, but out of curiosity,
What about existing accounts? None of them were created manually nor were there created with any kind of email info.
Will it be possible to link the existing 4500 account to the email info transparently?

On Mar 20, 2016, at 17:49, Frank Karlitschek [email protected] wrote:

login with email will be an option 9.1 automatically without the need to change anything.
emails can be changed manually or via ldap at any time


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

@blizzz
Copy link
Contributor

blizzz commented Mar 21, 2016

When Maria A works with ownCloud, everything is in the Maria_A folder.

She gets married, and is named Maria_B. The next time she logs in via LDAP, she has to type in Maria B as the username. She has no choice at all, Maria A doesn't work anymore.

If you're using the LDAP backend, you have other issues.

First, the login name is decoupled from the user name (and this is even so for local users, only it is not that radical). I hope changing the name in LDAP does not create a totally new record. The username for every LDAP user does not change once it is mapped. You can specify anything to login with, even including the email attribute. You can also specify a dedicated attribute to refer to the user folder. Usernames really should not be your problem at all.

@blizzz
Copy link
Contributor

blizzz commented Mar 22, 2016

Obviously you would not need to login with the UUID. It's all just a misconfiguration. Getting assistance earlier, also from our sales team, would have helped to get a properly running instance up. Frankly, what a username is, what to login with, and what uuid settings mean is all written up in the docs. If anything is unclear, bug reports against the documentation are welcome.

@cgogolin
Copy link

I would just like to add to this that the static, immutable user name is exposed to the user even if email login is used (at least through third party apps on 8.1).

The shared calendars CalDav links look like

http(s)://server:port/owncloud/remote.php/caldav/calendars/UserA/calendar-name
http(s)://server:port/owncloud/remote.php/caldav/calendars/userB/calendar-name_shared_by_userA

Users are hence reminded of the name of her/his divorced husband/wife when she/he wants to share a calendar with another user, even if she/he can login with her new email address.

I don't know how this is handled in 9.x. But since calendars have, if I remember correctly, been moved into the core, if this behavior has not changed, then this is now even a problem with core Owncloud.

@octacian
Copy link

octacian commented May 29, 2016

I think we need to quite arguing. This is a very important feature. Right now, I want to change my ownCloud username. To do that, I'm going to have to create a new user and manually move all my content followed by "re-sharing."

The real problem is, usernames are a identifier created by the user, almost as a nickname, to remove the need of typing in an email. Yes, both should be an option, but username's are not what the who referencing system should be based off of.

The referencing and URL system, should use a unique id or uid to identify users. The login system would then point emails and usernames to the id, allowing these to be changed whenever the user wanted. This would mean that usernames and emails would have to be unique, but they should be anyways.

Another way would be to update the references with the username, which should also be very simple if ownCloud properly users one central resource for such references.

Overall, the task is very simple. Even updating plugins is simple. In fact, I will put some time into this myself when I get time. (if that ever happens.) This is ridiculously simple, come on guys.

@ffuentes
Copy link

+1

Would be nice that the username could be changed.

@stevejordi
Copy link

Unfortunately, to implement such a feature they would first have to hire a real DBA who knows what a database is. This database model is out of control, has been hastily cobbled together to meet the personal needs at the beginning by someone with no DB experience. As the solution grew bigger, it dragged that constrain along.
The DB is a resource hog, it generates more than 60% of the ownCloud overhead.
When you have strings holding information that can change used as keys, something is screwed from the beginning. It has to get back to the drawing board before any other feature.

@octacian
Copy link

@stevejordi I think that anybody could take the basic idea I mentioned earlier, and rework the database following along that. As I said before, this is a very simple problem. I am by no means a DBA, but from taking a look at the database, it may not have been designed the best and does need some work, but it's nothing major. It does the job, except for in this case. Making it work here is simple as well.

Once again, if I ever get time, I'll try and do something about this 😃

@stevejordi
Copy link

What would have been nice would have been a DB diagram with primary and foreign keys.
I'm ready to write a small app myself to make the changes in the DB if I don't need to reverse-engineer the entire stuff.

Steve

On Sep 12, 2016, at 16:13, Elijah Duffy [email protected] wrote:

@stevejordi https://github.com/stevejordi I think that anybody could take the basic idea I mentioned earlier, and rework the database following along that. As I said before, this is a very simple problem. I am by no means a DBA, but from taking a look at the database, it may not have been designed the best and does need some work, but it's nothing major. It does the job, except for in this case. Making it work here is simple as well.

Once again, if I ever get time, I'll try and do something about this 😃


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #6984 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AMHTYsZyvc0vYN4OiiwdahC6QV-tSSz1ks5qpdyNgaJpZM4BdJsL.

@Pazu
Copy link

Pazu commented Nov 4, 2016

I would like to point out one place where the username is visible. If user foo shares a calendar named bar, then other users see that calendar as "bar(foo)".

@atelierscym
Copy link

@stevejordi I think the app which parses the DB to change user names, should also have an option to send an email to all users who share things with the user which changes name (such as calendars). If I can be of any help to write such an app please ask.

@TrapperPhD
Copy link

Any news on that one? Impatiently waiting for solution allowing to change user name.

@archont00
Copy link

Luckily I do not use many functionalities apart from simple file storage, carddav and caldav - so hopefully simple copying files and export + import would suffice.

@PVince81
Copy link
Contributor

Using account ids instead of user ids everywhere would allow this: #29503

@sscholl
Copy link

sscholl commented Mar 22, 2018

+1

@butonic butonic self-assigned this Apr 20, 2018
@butonic butonic modified the milestones: backlog, planned, development Apr 20, 2018
@butonic butonic added the p3-medium Normal priority label Apr 20, 2018
@PVince81
Copy link
Contributor

PVince81 commented Jul 24, 2018

and here's an overview of some tables to look at in which the username would need to be changed if one would want to do this manually: #29993

the additional challenge is that if third party apps are using user ids as well they'd need to know as well that we want to rename so their own tables also get updated (hook?)

In any case, it sounds like first moving to account id is the better solution. Once this is done, renaming a user id is only a matter of a single table.

@PVince81 PVince81 modified the milestones: development, backlog Jul 24, 2018
@butonic
Copy link
Member

butonic commented Feb 18, 2019

closing in favor of #29503

@butonic butonic closed this as completed Feb 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.