Align user account tab menus in portal app & drupal
12757
Reporter: mdoering
Assignee: cvizitiu
Type: Bug
Summary: Align user account tab menus in portal app & drupal
Priority: Major
Resolution: Fixed
Status: Closed
Created: 2013-02-19 11:40:58.114
Updated: 2013-09-02 13:46:32.102
Resolved: 2013-03-04 18:16:05.238
Description: The user account menus in drupal and the java app differ. Make sure they are the same.
Ideally we should have only 3 tabs for now:
1 - Account /user (page allows you to modify your account details)
2 - Downloads /user/downloads
3 - Name Lists /user/namelists (inactive)
If Drupal needs to know the user integer id we need to modify our api User class. Hopefully we can use the user account name instead or even no name at all as the user is in the session.
]]>
Author: mdoering@gbif.org
Created: 2013-03-04 10:55:34.467
Updated: 2013-03-04 10:55:34.467
The user home does not allow to edit my user settings. Where else would I change my current email or update my full name?
http://staging.gbif.org/drupal/user/
Author: mdoering@gbif.org
Comment: Please also add a title like "Your GBIF Account" similar to downloads and namelists to the user account home above the already existing line
Created: 2013-03-04 10:57:42.306
Updated: 2013-03-04 10:57:42.306
Author: cvizitiu@gbif.org
Comment: But Markus! How did you ended up on http://staging.gbif.org/drupal/user/?! The upper menu link "Hello Markus" should point to /user/xx/edit! There must be an old link somewhere... the .../user/ page IMHO is now redundant. For sure the drupal front page should take you directly to "edit".
Created: 2013-03-04 11:03:10.715
Updated: 2013-03-04 11:03:10.715
Author: mdoering@gbif.org
Created: 2013-03-04 11:45:12.983
Updated: 2013-03-04 11:45:57.814
the users integer key is unknown to the java portal - if its required for the link we need a dead serious update to our code which Im not sure we can handle until thursday when we need to start releasing. Not chance to just use the link without the key and look into the session?
We could use the account name in the link, but please not the integer keys
Author: cvizitiu@gbif.org
Created: 2013-03-04 11:48:23.073
Updated: 2013-03-04 11:48:23.073
Well I don't know right now how to bypass the userID. What seem to be the problem? If you're hitting the DB to see if the user / pass is valid then all you need is to extract one more value from the same query.
I've added a simple "edit your profile" link to the user page. Would that do?
Author: mdoering@gbif.org
Comment: No, a new link would need a new tab and that tab also need to exist on the java portal and we're back to the original problem that we dont have access to the user key. What about a redirect in drupal when hitting /user/ to the current user page?
Created: 2013-03-04 12:01:18.14
Updated: 2013-03-04 12:01:18.14
Author: mdoering@gbif.org
Comment: If we need the key then a) we need to change our API User model class and the persistence layer to retrieve the key - can be done, just api changes are nasty. But then we have a User class with a unique account name AND a key. That seems very superflous. Why do we then have an account name at all?
Created: 2013-03-04 12:02:33.493
Updated: 2013-03-04 12:02:33.493
Author: cvizitiu@gbif.org
Created: 2013-03-04 12:04:11.478
Updated: 2013-03-04 12:04:11.478
Have you looked at it? :-) Think it goes OK without the extra tab... rather than redirect the /user to /user/number/edit I'll look into possible ways to redirect /user/username to something more appropriate.
Mark my words Markus: the more we change into Drupal's defauls URLs the more I'm getting into a bad smelling swamp! :-o
Author: mdoering@gbif.org
Comment: any redirection would be fine. Once you know whats working best let me know if you prefer to have the account name in the URL (e.g. /user/markus) or just a fixed link like /user/account
Created: 2013-03-04 12:08:49.631
Updated: 2013-03-04 12:08:49.631
Author: cvizitiu@gbif.org
Comment: Because, like any good database designers, the Drupal folks tied the user to the ID not to a variable string of letters!! If Marina Constantinescu gets married to Ciprian Vizitiu THEN her username should be mvizitiu, not mconstantinescu!! :-@ And that's exactly why people were allowed to change their username in the first place!! You can't curse someone with a username for the rest of his or her life... it's the userID 54 who registered into the DB, not cvizitiu! :-s
Created: 2013-03-04 12:09:34.566
Updated: 2013-03-04 12:18:54.321
Author: cvizitiu@gbif.org
Comment: Markus, I'll try to make the redirect if the link inside the page doesn't suit you (and changing the Java to make use of the userID instead of the username is that difficult). But I would like to have it in writing here: design wise, tying the user to the username instead of the ID it's a bad idea IMHO. :-s
Created: 2013-03-04 12:31:39.486
Updated: 2013-03-04 12:31:39.486
Author: mdoering@gbif.org
Comment: Thats the difference between a user name and a real name. We decided like google or facebook not to expose integers for accounts
Created: 2013-03-04 13:38:14.153
Updated: 2013-03-04 13:38:14.153
Author: cvizitiu@gbif.org
Created: 2013-03-04 18:13:04.18
Updated: 2013-03-04 18:18:09.323
OK, I've got it working on staging; you can call .../users/username/edit and, if you're logged in you'll get the edit page. BUT!! In order to have this working I did the unforgivable: I edited the core. :-s The key module "Extended path aliases" requires either an edit into the core OR "php-pecl-runkit". The versions of "php-pecl-runkit" available for staging will make PHP coredump while the site becomes completely unusable; the only option was to alter the path.inc. Either this or we stay with the regular page where I insert an edit link but that will again display the uiserID.
Mind the "s" at the end: the alias is under .../users/username not .../user/username
Author: mdoering@gbif.org
Comment: Is the plural "s" needed?
Created: 2013-03-04 21:53:35.895
Updated: 2013-03-04 21:53:35.895
Author: cvizitiu@gbif.org
Comment: Technically speaking not. But I thought I'd make things easier for me if I keep the alias URL different all the way from /; I tried coming up with a better URL idea but no luck.
Created: 2013-03-04 21:59:30.541
Updated: 2013-03-04 22:02:25.752