Create local accounts with proxied email

Dave Cohen - April 9, 2009 - 18:35
Project:Drupal for Facebook
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Dave Cohen
Status:closed
Description

Currently, fb_user.module creates local accounts with no email address. Thanks to http://wiki.developers.facebook.com/index.php/Proxied_Email, it should be easy to create those accounts with an email address. Although the email will not be received if the user has not granted the app an extended permission, this is still much better than nothing.

Should be a simple change and I'm using this issue to keep track of it. Any volunteers? If so assign the issue to yourself.

#1

Dave Cohen - April 10, 2009 - 22:56
Assigned to:Anonymous» Dave Cohen
Status:active» needs review

This turns out to be more complicated than expected, because Drupals users.mail column is too short to handle the long email addresses that facebook uses. Altering the table makes it possible. But some may not wish to do that, so I made it possible to change the behavior via $conf['fb_user_use_proxied_email']

Here's a patch.

AttachmentSize
fb_proxied_email.diff 2.69 KB

#2

tengoku - September 2, 2009 - 19:11

hello.... hey really thanks for this module...

i have the same problem... but when i try to patch this file it give me a error (like a different file)

so i tried to patch manually and found that i updated the module recently so i already got that code... except for fp_user.module on line 699 to add:

// use http://wiki.developers.facebook.com/index.php/Proxied_Email if mail not known
    if (!isset($config['mail']) && variable_get('fb_user_use_proxied_email', TRUE)) {
      $config['mail'] = $config['info']['proxied_email'];
    }

so plz.. this is true???? i added the code manually and appears to work...

thanks in advance.

#3

Dave Cohen - September 3, 2009 - 09:39
Status:needs review» fixed

I checked in changes, but forgot to resolve this issue. So there is no need to apply the patch.

Do not make that change to line 699. It is not necessary. The way it works now is that if the user has an email address saved in the Drupal database, that email is used. The proxied email is used only when the email is not known. It is set when the user data is loaded, and not saved when the user data is created or updated.

#4

System Message - September 17, 2009 - 09:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.