Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
user.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Dec 2012 at 19:04 UTC
Updated:
29 Jul 2014 at 21:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirComment #2
berdirFirst patch.
IMHO, user_view() user(-profile).tpl.php and template_preprocess_user(_profile) have a lot of duplicated, unecessary information that doesn't belong in there, like how to use a template file, how to work with fields, that it's used for user/uid, lots of mentions of profile (and categories) which doesn't make much sense anymore now that profile.module is removed. And if profile2.module will be added, then that will mean completely different templates anyway. Another topic is the mix of account and user, not sure what to do about.
Comment #3
moshe weitzman commentedNice. We're finally back to using generic render controller. Wait for green before commit
Comment #4
tim.plunkettComment #5
tim.plunkettActually, we should do this.
Comment #6
moshe weitzman commentedEven better. Wait for green before commit
Comment #7
berdirHah you're fast ;)
I actually left the render controller because I wanted to move http://api.drupal.org/api/drupal/core%21modules%21user%21user.module/fun... into it and then kinda forgot and wasn't sure if we should do this in the same issue :)
Comment #8
webchickHm. We seem to have removed some context from the theme function/template name? You're theming a user profile here, not a user. A user can show up in many different ways: the author of a node, a sidebar block, etc. Seems best to be explicit. Am I missing something?
Comment #9
berdirThere's no such thing as a user profile anymore IMHO. user is an entity and we do an entity_view($user) to view it. Why should that use node.tpl.php for nodes but user-profile.tpl.php for users?
node and comment author (picture) now also use user_view() and also use user-profile.tpl.php. And if profile2.module makes it into core, we have user-profile.tpl.php and profile.tpl.php...
Comment #10
berdirThere's no such thing as a user profile anymore IMHO. user is an entity and we do an entity_view($user) to view it. Why should that use node.tpl.php for nodes but user-profile.tpl.php for users?
node and comment author (picture) now also use user_view() and also use user-profile.tpl.php. And if profile2.module makes it into core, we have user-profile.tpl.php and profile.tpl.php...
Comment #11
moshe weitzman commentedBerdir has it right. Just to elaborate, we have view modes now so themeing a user in a sidebar can be user_view($account, 'narrow') or whatever.
Comment #12
catchYeah I think this is fine and berdir's answer makes sense. If anything we'd use account here but the entity isn't called account so best to just keep it consistent. Committed/pushed to 8.x.
Comment #13.0
(not verified) commentedUpdated issue summary.