You are here

function _hybridauth_decode_authname in HybridAuth Social Login 7

Changes an authname back into the provider identifier format

File

./hybridauth.module, line 668

Code

function _hybridauth_decode_authname($provider_id, $authname) {
  switch ($provider_id) {
    case 'Facebook':
      return str_replace('http://www.facebook.com/profile.php?id=', '', $authname);
    case 'Twitter':
      return str_replace('http://twitter.com/account/profile?user_id=', '', $authname);
    case 'Google':
      return str_replace('https://www.google.com/profiles/', '', $authname);
    default:
      return $authname;
  }
}