This module has helped my clients a lot. I noticed today, though, when you cancel your own account, you get the options:

Report as inappropriate
Do not report
Spam, unsolicited advertising
Obscene, violent, profane
Low-quality
Unwanted, taunting, off-topic

That doesn't seem right, especially since it defaults to the last option so people could report themselves as bad if they just want to cancel their account. Is there a way to change that behaviour or is it a bug?

Thanks,
Troy

Comments

aangel’s picture

I didn't want users to be able to report themselves either. The culprit is the logic in mollom.module here:


  // Integrate with delete confirmation forms to send feedback to Mollom.
  if (isset($forms['delete'][$form_id])) {
    // Check whether the user is allowed to report to Mollom. Limiting report
    // access is optional for forms integrating via 'delete form' and allowed by
    // default, since we assume that users being able to delete entities are
    // sufficiently trusted to also report to Mollom.
    $access = TRUE;
    // Retrieve information about the protected form; the form cache maps delete
    // confirmation forms to protected form_ids, and protected form_ids to their
    // originating modules.
    $mollom_form_id = $forms['delete'][$form_id];
    $module = $forms['protected'][$mollom_form_id];
    $form_info = mollom_form_info($mollom_form_id, $module);
    // Check access, if there is a 'report access' permission list.
    if (isset($form_info['report access'])) {
      $access = FALSE;
      foreach ($form_info['report access'] as $permission) {
        if (user_access($permission)) {
          $access = TRUE;
          break;
        }
      }
    }
    // Omit reporting form during user cancelation. 
    if ($mollom_form_id == 'user_register_form') $access = FALSE;
    if ($access) {
      mollom_data_delete_form_alter($form, $form_state);
      // Report before deleting. This needs to be handled here, since
      // mollom_data_delete_form_alter() is re-used for mass-operation forms.
      array_unshift($form['#submit'], 'mollom_data_delete_form_submit');
    }
  }

The "Omit reporting..." and subsequent line are not part of the original code.

Note that the assumption is that the user has the right to see the Report as Inappropriate form, mentioned in the first comment. It looked to me that to change that required that the User Cancelation form show up as part of the form configuration list (mollom_form_list) and that some logic be added to allow turning the reporting form off. I don't have a patch (sorry) but the line I added above ( if ($mollom_form_id == ...) ) is doing the job for me until a better mechanism is implemented.

Jiri Volf’s picture

subscribing

markwk’s picture

Status: Active » Needs review
StatusFileSize
new491 bytes

Nice work aangel. This makes sense and works nicely as a fix. I attached patch for 7.x-1.x branch.

Status: Needs review » Needs work

The last submitted patch, 1206644-do-not-report-for-cancel-own-account.patch, failed testing.

markwk’s picture

Well obviously those tests will fail since this patch wants to prevent those actions in those situations... :)

sun’s picture

Status: Needs work » Closed (won't fix)

This is an extreme edge-case, and I doubt that it's worth to cater for it.

Specifically, I don't see what's ultimately wrong with having the Mollom feedback options in the confirmation form when you're canceling your own account.

The options only appear if you are able to moderate (administer) users in the first place. That's certainly a very small minority of all users on a site, and additionally, those users (community moderators/administrators) are very unlikely to cancel their own account.

Even if they cancel their own account, there's technically nothing wrong with allowing them report themselves as inappropriate... Of course, doing so will negatively affect their own reputation across Mollom-protected sites. But is it wrong? Not really.

In the end, I don't see sufficient reasons for introducing code and complexity to account for this rare, special case.

markwk’s picture

You're right. During the test process, I was using an admin account. A normal user won't have access to this reporting option anyways.

troybthompson’s picture

Just for clarification, it's not just on admin accounts. When signed in as a regular user and I try to cancel my account, it asks me to report myself. They have permissions to "cancel own user account" but not "select method for canceling own account". I'm using Mollom 7.x-1.1

sun’s picture

Component: User interface » Tests
Status: Closed (won't fix) » Active
troybthompson’s picture

With all due respect, is it possible to at least make the default to be "Do Not Report"? Like I say, it's not "extreme edge-case" it's any user wanting to cancel their account, not just administrators.

If I have a user that is no longer interested in my site, or worse, upset with something that happened on the site, their wishes should be honored respectfully. It seems insult to injury to not only point the blame at them and ask if they're a spammer, etc but to have the default saying that they were taunting, which could prevent them from registering at other Mollom sites when they're just trying to exit.

Am I understanding this correctly, or am I missing some sort of setting?

sun’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: support » bug
Status: Active » Needs review
StatusFileSize
new4.3 KB

@troybthompson: That bug has been fixed in 2.x already and will be part of the upcoming stable release.

And apparently, you're right. :) Attached patch proves in a test that this is indeed bogus.

Status: Needs review » Needs work

The last submitted patch, mollom.cancel-own-account.11.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new8.38 KB

Attached patch fixes the issue.

sun’s picture

Title: Canceling Own Account Lets Your Report Yourself » Cancelling own account lets your report yourself
Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)
Issue tags: +Needs backport to D6

Thanks for reporting, reviewing, and testing! Committed to 7.x-2.x.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

This needs to be backported to 6.x-2.x, but that... won't be so easy.

sun’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new8.71 KB

Backported to D6.

sun’s picture

Status: Needs review » Fixed

Committed to 6.x-2.x.

troybthompson’s picture

Status: Fixed » Closed (fixed)

Upgraded and 2.x version works great, thanks!

  • Commit 9ea02c6 on 7.x-2.x, 8.x-2.x, fbajs, actions by sun:
    - #1206644 by sun, markwk, troybthompson: Fixed Cancelling own account...

  • Commit 9ea02c6 on 7.x-2.x, 8.x-2.x, fbajs, actions by sun:
    - #1206644 by sun, markwk, troybthompson: Fixed Cancelling own account...