Loopcast / beta

1 stars 0 forks source link

Issue when changing username #167

Closed hems closed 9 years ago

hems commented 9 years ago

Hey man i did a lot of refactoring today regarding the users and it's relationship to the rooms and also the search/filter by genre, fixing the avatar that was always changing, etcs and i'm afraid i might have broken the changing user on the frontend?

Could you please have a look?

Now every room has the user_id, so it will never loose track of the user, i also had to update the field "info.user" on each room when the user updates the username, so the links on the pages stays consistent as well..

it seems that some times i have to logout and then login again to get some properties back.

stefanoortisi commented 9 years ago

I think the best way to avoid all this kind of problems with relationships between different entities is keep the internal ids untouched and edit a "username" property, completely unlinked to the rooms or anything else. It would be way more efficient and manageable. What do you think?

stefanoortisi commented 9 years ago

I fixed the profile page with all the editable input. But I still get a problem with my recording rooms. When I change my username, i still get my old rooms but their info about the user are not updated.

screenshot 2015-05-07 12 21 59

So, my current username is stefanoortisi, but inside the recording array, the rooms have info.user = "ciccioortisi" which was the old username.

hems commented 9 years ago

@stefanoortisi with the latest version renaming the username works, the rooms stays associated with the user, but i have to refresh my profile page in order for the link to point to the new address.

does it work for you now?

stefanoortisi commented 9 years ago

@hems yes now it works. I update manually the links when the username changes. :+1:

hems commented 9 years ago

there was also a bug that the username was being set to "null" if the user updated the info without updating the username. i saw that fucked a bunch of rooms, so i'll delete them