Well, that't the way to fetch the current user, but I want something else. To set the curremt user as default in a text box in the admin interface of EZ publish. It seems that I should modify the template in the admin site but I rather wouldn't. Is there any other way?
--
Nothing is impossible. Not if you can imagine it!
I don't quite get you. In a text box you can only put some default "text" value right. So isn't what you want to fetch the current user and put his name in this text box? (When you create a new object?)
Well, that's one sollution, but for that I have to change the EZ code of the amdin interface on my site, and I'd rather avoid that. I tought that it can be done in some other way.
--
Nothing is impossible. Not if you can imagine it!
I also see the need for this. And am not 100% of where and how to setup such an override. Would it be in edit_attribute.pl?
It's a bit similar to what the tip a friend feature does - defaults to name and e-mail of logged in user but lets you change. Could actually be a nice thing to be able to use specify such defaults directly in the class attributes.
It can be done by changing the templates. Simply fetch the user objects and put the value you need into the input field. Since this is the administration interface I suggest you use an override to make it easier for you to upgrade.
I know you are looking for another way, unfortunately it is not there :/
It would be nice if something like this is made available in future versions of EZ, if it exists for the date attribute, why shouldnt for other.
In my opinion, a great thing would be to enable users to put something like this as a default value:
<$current_user.name>
or:
<$node.owner.name>
so when the attribute is displayed for editing, the value of the corresponding variable is set as default. Does anyone else like this idea? Should we suggest it in the "Suggestion" forum?
--
Nothing is impossible. Not if you can imagine it!