Flickr message after account creation



Websites Graveyard
11 years ago
7 years ago


(Reporter: alix, Assigned: Chris Pollett)





(1 attachment, 1 obsolete attachment)



11 years ago
Create an account on the new, 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?

Comment 1

10 years ago
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


10 years ago
Assignee: nobody → cpollett

Comment 2

10 years ago
Created attachment 321787 [details] [diff] [review]
patch to fix problem and also gets rid of ^M's

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.

Comment 4

10 years ago
Created attachment 321979 [details] [diff] [review]
revised patch
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+

Comment 6

10 years ago
Thanks for your help Ryan,

Checked-into r13431
Last Resolved: 10 years ago
Resolution: --- → FIXED
Product: Websites → Websites Graveyard
You need to log in before you can comment on or make changes to this bug.