Project

General

Profile

Actions

Bug #15250

closed

t3lib_BEfunc::blindUserNames() does not work sometimes

Added by Dmitry Dulepov over 18 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2005-11-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This function does not work properly if the follwing two conditions were met:
- a list of user's groups were changed
- user did not log on to BE after group changes and before t3lib_BEfunc::blindUserNames was called

The problem is that t3lib_BEfunc::blindUserNames uses 'user_group_cached' field from be_user. This field is absolutely identical to 'usergroup' field (except database type which is irrelevant in this case). 'user_group_cached' is set to the value of when user 'usergroup' when user logs in. Thus fields in be_user record is not in sync.

I have no solution for this problem. Probably user_groups_cached should not be used at all.

(issue imported from #M1960)


Files

1960-usergroup_cached.patch (4.73 KB) 1960-usergroup_cached.patch Administrator Admin, 2010-03-05 22:41

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Feature #17630: gr_list concept needs to be improvedNew2007-09-27

Actions
Related to TYPO3 Core - Bug #27303: t3lib_BEfunc::blindUserNames might use wrong group list collectionClosed2011-06-08

Actions
Actions #1

Updated by Dmitry Dulepov over 18 years ago

'user_group_cached' above should read 'usergroup_cached_list'.

'usergroup_cached_list' in fact contains full list of user's groups incliding subgroups from other groups.

Actions #2

Updated by Sebastian Kurfuerst over 18 years ago

Hi,
a possible solution could be writing a function for updating the usergroup_cached_list and do this on saving a BE user record. What do you think?
Greets, Sebastian

Actions #3

Updated by Dmitry Dulepov over 18 years ago

I think user record is edited through alt_doc.php (as any other record). Thus it is hard to know when it is saved without introducing a userFunc for the table. This function should be called when record is saved.

Actions #4

Updated by Sebastian Kurfuerst over 18 years ago

Hi,
another idea might be to check when the cached user group list is used in TYPO3 and check where it gives performance gains. - So maybe we could get rid of this field generally and create a function $BE_USER->getUserGroups or so?
Just some thoughts, and thanks Dmitry for taking care of this :-) (And btw welcome to the core team!)
Greets, Sebastian

Actions #5

Updated by Dmitry Dulepov over 18 years ago

Thanks, Sebastian :) Such function exists in one of t3lib_user*.php files, it only needs to be called. I think I will look where else "usergroup_cached_list" is used and see how we can do fix it with minimal effort.

Actions #6

Updated by Sebastian Kurfuerst over 18 years ago

Great Dmitry!
Thanks for your efforts,
Sebastian

Actions #7

Updated by Sebastian Kurfuerst about 18 years ago

Hi Dmitry, did you already have time to look into this?
Greets, Sebastian

Actions #8

Updated by Dmitry Dulepov almost 16 years ago

Deassigning from myself because I am not sure when I can take care of it

Actions #9

Updated by Georg Ringer about 14 years ago

all this would need is the following code:

if ($table == 'be_users') {
$tempBeUser = t3lib_div::makeInstance('t3lib_userAuthGroup'); // New backend user object
$tempBeUser->user_table = 'be_users';
$tempBeUser->setBeUserByUid($id);
$tempBeUser->fetchGroupData();
}

called in the tcemain, e.g. with the hook afterDatabaseOperations

I just don't know where to place the code

Actions #10

Updated by Georg Ringer about 14 years ago

patch now attached

Actions #11

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • PHP Version deleted (4)

Hi Dmitry,

is this fixed in newer Versions?

Actions #12

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Actions

Also available in: Atom PDF