You are here

function fb_register_email_hash in Drupal for Facebook 6.2

Compute email hash as specified in http://wiki.developers.facebook.com/index.php/Connect.registerUsers

2 calls to fb_register_email_hash()
fb_register_user in contrib/fb_register.module
Implementation of hook_user().
_fb_register_register_users in contrib/fb_register.module
Register a chunk of users.

File

contrib/fb_register.module, line 379
This code aims to prevent duplicate accounts.

Code

function fb_register_email_hash($mail) {
  $mail = strtolower(trim($mail));
  $crc32 = sprintf('%u', crc32($mail));
  $md5 = md5($mail);
  $hash = $crc32 . '_' . $md5;
  return $hash;
}