-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
LDAP: fix null where IUser is expected in update groups background job #23799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Arthur Schiwon <[email protected]>
Signed-off-by: Arthur Schiwon <[email protected]>
89d2b10 to
3a51160
Compare
|
🤖 beep boop beep 🤖 Here are the logs for the failed build: Status of 34809: failuremysql8.0-php7.4Show full log |
skjnldsv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐘
rullzer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even test.
🐘
ChristophWurst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good
| ->from('ldap_group_members'); | ||
| $result = $qb->execute()->fetchAll(); | ||
|
|
||
| $this->groupsFromDB = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could use array_map :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. doesn't make much difference, but perhaps lookin a bit fancier than good ol' foreach. iirc it is also more memory hungry than foreach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
who cares about memory footprint if you can have fancy 😉
for me it's mostly about readability. If I see an array_map I immediately can guess what's happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can be a concern, depending how users and groups you throw on it. In this case the readability wouldn't really change as it is a one-line-transformation of the result array, either way.
|
/backport to stable20 |
|
/backport to stable19 |
|
/backport to stable18 |
This can happen when a user was already removed, but the DB table was having old information. Previously – with the old events – it did not cause a problem, because an old user id was passed. Now, an IUser object was required. Comes with tests and thus some refactoring against the necessary methods of the job. The actual fix is the second commit.