Bug #15246
closedNew hook in class.t3lib_userauthgroup.php
0%
Description
Hi,
For a client I made a hook in class.t3lib_userauthgroup.php in the fetchGroups subroutine. Is it possible to add this hook to the official TYPO3 distribution?
In the attached file I marked my changes with "XXX" (2 places).
If this is not the place to make such a request, then please accept my apologies.
Best regards,
Rik Hoevers
Netcreators
(issue imported from #M1952)
Files
Updated by Sebastian Kurfuerst almost 19 years ago
Hi Rik,
can you attach a patch in unified diff format? This would help even more to get it faster into the core.
Greets, Sebastian
Updated by Rik Hoevers almost 19 years ago
Hey Sebastian, thnx for your fast reply! :-)
I'd be glad to attach the patch... could you tell me the command that I should issue to produce it?
Regards, Rik
Updated by Sebastian Kurfuerst almost 19 years ago
Hi,
see this link for more information: http://de.wikipedia.org/wiki/Diff
if you are using windows, there is a windows implementation as well.
Greets,
Sebastian
Updated by Rik Hoevers almost 19 years ago
ok, check... i made a diff with the 3.8.0 original version,
grtz - rik
Updated by Rik Hoevers almost 19 years ago
So, I wonder, will this hook be integrated in future versions of TYPO3?
Updated by Sebastian Kurfuerst almost 19 years ago
Hi Rik,
I just checked the hook again and have a question about it: What exactly do you need it for in your application? I discussed it with Stucki and we are curious what the sense is of the hook.
Thanks!
Greets, Sebastian
Updated by Rik Hoevers almost 19 years ago
Happy newyear all!
The situation is as follows: a client maintains the backend users with a LDAP import / update. The imported users are all members of a bunch of groups, most of them of no importance for TYPO3. But they are all member of 1 group with a name like "typo3_<lalala>" which is the group that is relevant when logging in in TYPO3. The groups are imported in a random order, but when an editor creates a new page, this page belongs to the group that is the first in the list of groups. Quite often this is a different group than the "typo3_<lala>" group which leads to problems with permissions when another editor wants to edit the page.
Even manually re-sorting the groups is no sollution, because the are scrambled after each LDAP update.
To fix this I created a small extension (I uploaded the main file, class.user_firstMainGroup.php) that checks the name of a group, and sets it as firstMainGroup if it matches typo3
Since I'm new to programming TYPO3 I suspect that this can be done more efficiently than this, but it works and the client is quite and seems to be happy. I hate to leave them with a non-upgradable TYPO3 installation though.
I hope this explains enough, best regards,
Rik
Updated by Sebastian Kurfuerst almost 19 years ago
Hi, I would suggest a hook as suggested in 1952_2.patch. I think by manipulating $this, everything can be done.
What do you think?
Greets, Sebastian
Updated by Sebastian Kurfuerst almost 19 years ago
The hook is in the core now.
Greets, Sebastian