Closed Bug 409995 Opened 17 years ago Closed 16 years ago

Flickr message after account creation

Categories

(Websites Graveyard :: spreadfirefox.com, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alix, Assigned: cpollett)

References

()

Details

Attachments

(1 file, 1 obsolete file)

Create an account on the new spreadfirefox.com, click on the 1-time login URL to set your password, the confirmation message includes the following: "<username>'s Flickr page has been deleted"

The same thing happens when editing one's account (from the My Stuff->My Account page).

The message will be confusing to users who never entered a flickr identifier. Is it possible to remove it for those users?
This is coming from the flickr module: trunk/sites/all/modules/flickr/flickr.module

You can recreate it by editing "my account" and hitting submit without changing anything.

My best guess is that drupal sets the $op to 'update' in this case -- and the logic of the module causes to hit the conditional in which the message is printed.

  elseif ($op == 'insert' || $op == 'update') {

There needs to be some validating to make sure that the message is only printed when the 'flickr_identifier' field goes from being not null to null. Right now it is being printed whenever the page is updated and the 'flickr_identifier' is null.

    elseif ($op == 'insert' || $op == 'update') {
    if (isset($edit['flickr_identifier'])) {
      db_query('DELETE FROM {flickr_users} WHERE uid=%d', $account->uid);
      if (!empty($edit['flickr_identifier'])) {
        db_query("INSERT INTO {flickr_users} (uid, nsid, identifier) VALUES (%d, '%s', '%s')", $account->uid, flickr_user_find_by_identifier($edit['flickr_identifier']), $edit['flickr_identifier']);
      }
      else {
        //flickr account deleted
        drupal_set_message(t('%username\'s Flickr page has been deleted.', array('%username'=> $account->name)));
      }
    }
Assignee: ian-bugzilla → nobody
Priority: -- → P1
Assignee: nobody → cpollett
The contentful part of the patch is essentially where polvi suggests. I moved where the delete messages is given. The patch is a bit longer that just that though, because the whole file had a bunch of ^M's in it. I also reformatted some long lines in the sfx_affiliates module. I didn't change any code though in these sections. Polvi's method for re-creating the problem was also used. Go to My Account, click edit and then submit without changing anything. Before patch will get the Flickr account deleted message, afterwards you won't.
Attachment #321787 - Flags: review?(rdoherty)
Patch isn't working for me, not sure why. I svn up'd just before applying.

patching file sites/all/modules/flickr/flickr.module
Hunk #1 FAILED at 80.
Hunk #4 FAILED at 464.
Hunk #5 FAILED at 490.
Hunk #6 FAILED at 527.
Attached patch revised patchSplinter Review
Attachment #321787 - Attachment is obsolete: true
Attachment #321979 - Flags: review?(rdoherty)
Attachment #321787 - Flags: review?(rdoherty)
Comment on attachment 321979 [details] [diff] [review]
revised patch

Confirmed, no more flickr account info shown!
Attachment #321979 - Flags: review?(rdoherty) → review+
Thanks for your help Ryan,

Checked-into r13431
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: