Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16789

user_delete documentation incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3.5-RC1
    • 3.3.4
    • ACP

      The documentation for the user_delete function in /includes/functions_users.php is incorrect. It is:

      /**

      • Delete user(s) and their related data
        *
      • @param string $mode Mode of posts deletion (retain|delete)
      • @param mixed $user_ids Either an array of integers or an integer
      • @param bool $retain_username True if username should be retained, false otherwise
      • @return bool
        */

      $mode should be:

      • @param string $mode Mode of posts deletion (retain|remove)

      It addition, this function could probably be improved by returning an error if the $mode parameter is passed some value other than retain or remove. I passed delete and it did not delete the posts too, leading to an inconsistent database. In addition, the last line of the function returns false. I don't see any condition where the function returns true, so perhaps this needs to be changed as well.

            Marc Marc
            MarkDHamill MarkDHamill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: