|
@@ 282-296 (lines=15) @@
|
| 279 |
|
/** |
| 280 |
|
* @inheritdoc |
| 281 |
|
*/ |
| 282 |
|
public function onExpansionGroupAddUser(Group $group, $loginAdded) |
| 283 |
|
{ |
| 284 |
|
$group = $group->getName(); |
| 285 |
|
|
| 286 |
|
// User was added to group, need to display all manialinks of the group to this user |
| 287 |
|
if (isset($this->displayeds[$group])) { |
| 288 |
|
foreach ($this->displayeds[$group] as $mlId => $manialink) { |
| 289 |
|
$this->individualQueu[$loginAdded][$mlId] = $manialink; |
| 290 |
|
|
| 291 |
|
if (isset($this->hideIndividualQueu[$loginAdded]) && isset($this->hideIndividualQueu[$loginAdded][$mlId])) { |
| 292 |
|
unset ($this->hideIndividualQueu[$loginAdded][$mlId]); |
| 293 |
|
} |
| 294 |
|
} |
| 295 |
|
} |
| 296 |
|
} |
| 297 |
|
|
| 298 |
|
/** |
| 299 |
|
* @inheritdoc |
|
@@ 301-315 (lines=15) @@
|
| 298 |
|
/** |
| 299 |
|
* @inheritdoc |
| 300 |
|
*/ |
| 301 |
|
public function onExpansionGroupRemoveUser(Group $group, $loginRemoved) |
| 302 |
|
{ |
| 303 |
|
$group = $group->getName(); |
| 304 |
|
|
| 305 |
|
// User was removed from group, need to hide all manialinks of the group to this user |
| 306 |
|
if (isset($this->displayeds[$group])) { |
| 307 |
|
foreach ($this->displayeds[$group] as $mlId => $manialink) { |
| 308 |
|
$this->hideIndividualQueu[$loginRemoved][$mlId] = $manialink; |
| 309 |
|
|
| 310 |
|
if (isset($this->individualQueu[$loginRemoved]) && isset($this->individualQueu[$loginRemoved][$mlId])) { |
| 311 |
|
unset ($this->individualQueu[$loginRemoved][$mlId]); |
| 312 |
|
} |
| 313 |
|
} |
| 314 |
|
} |
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
/** |
| 318 |
|
* @inheritdoc |