Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14119

[PHP] (User) unban event request

    Details

    • Type: Improvement
    • Status: Unverified Fix (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.5
    • Fix Version/s: 3.1.11-RC1
    • Component/s: Events
    • Labels:
      None

      Description

      I'm developing a custom discussion system for bans, warnings and username changes and would like to know when someone gets unbanned manually. Therefore, I added

      {{ /**

      • Use this event to perform actions after the unban has been performed
        *
      • @event core.acp_unban_after
      • @var string mode One of the following: user, ip, email
      • @var string user_ids_ary Array with user_ids
      • @since
        */
        $vars = array(
        'mode',
        'user_ids_ary',
        );
        extract($phpbb_dispatcher->trigger_event('core.user_unban', compact($vars)));}}

      to the end of user_unban() in includes/functions_user.php. I also added a similar event to user_ban().

      In phpBB 3.1.5 the events core.acp_ban_after and core.mcp_ban_after are available, but there are no events for unbans.

      I prefer adding events for user bans and unbans in includes/functions_user.php above using events in the mcp and acp files. At the locations in functions_user.php more checks and computations have been done. In the case of the user_ban function, I did need the end date of the ban instead of 'ban of 30 minutes'. However, I would be satisfied too if the mcp and acp get events for unbans.

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              lunagang lunagang [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: