Skip to content
Snippets Groups Projects

6066824 - Added ability for admin to specify which account content can be assigned

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
438 442 break;
439 443
440 444 case 'user_cancel_reassign':
445 case 'user_cancel_reassign_user':
441 446 /** @var \Drupal\comment\CommentInterface[] $comments */
442 447 $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadByProperties(['uid' => $account->id()]);
448 if ($method === 'user_cancel_reassign_user') {
449 $uid = $edit['user_cancel_assign_user'];
  • 438 442 break;
    439 443
    440 444 case 'user_cancel_reassign':
    445 case 'user_cancel_reassign_user':
    441 446 /** @var \Drupal\comment\CommentInterface[] $comments */
    442 447 $comments = \Drupal::entityTypeManager()->getStorage('comment')->loadByProperties(['uid' => $account->id()]);
    448 if ($method === 'user_cancel_reassign_user') {
    449 $uid = $edit['user_cancel_assign_user'];
    450 $user_entity = \Drupal::entityTypeManager()->getStorage('user')->load($uid);
  • 60 60 */
    61 61 #[Hook('user_cancel')]
    62 62 public function userCancelReassign($edit, UserInterface $account, $method): void {
    63 if ($method === 'user_cancel_reassign') {
    63 $uid = ($method === 'user_cancel_reassign_user') ? $edit['user_cancel_assign_user'] : 0;
  • There are few coding issues like empty/NULL value check and some f the changes not related to the ticket.

  • Please register or sign in to reply
    Loading