[Typo3-dev] default-value depending on BE-user in new page
Irene Höppner
irene.hoeppner at diacc.de
Thu Jul 29 20:21:48 CEST 2004
> Hi all,
> is it possible to set the default value of a field depending on the
> backend user when adding a new page?
>
> The reason is: In the table 'pages' I have a new field 'author',
> which is a select field referring to a table 'authors' which is
> referencing to be_users.
> If a backend user adds a new page, he has to be the author by
> default, but has to be able to change the author to another one of
> the list as well.
>
> What I tried already is:
erm... wrong key... sorry ;-).
Soooooo... I tried:
1. Looking for an itemsProcFunc. But with that I can only change the items
that might be selected and not the default value. Or do I miss something
here?
2. Setting ...['config']['default'] for that field in ext_tables.php of my
extension depending on the user. But there seems to be no $BE_USER in that
file. Looking in /typo3/init.php I see first:
// Include tables customization (tables + ext_tables)
and after that
// BackEnd User authentication
So, no BE_USER in ext_tables.php (which is a pity, as I would like to do
some other things with the TCA depending on the user).
3. Looking in TCEMAIN and TCEFORMS TSconfig, but didn't find anything I
could use here as well.
Does anybody know, if I'm missing something (probably very simple ;-)), or
if it's just not possible to set the default value of a field depending on
the be-user without changing the core?
Thx a lot :-).
Irene
--
DIACC GmbH
http://www.diacc.de/
More information about the TYPO3-dev
mailing list