Skip to content

Instantly share code, notes, and snippets.

@jandrieu
Created July 24, 2012 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jandrieu/3171645 to your computer and use it in GitHub Desktop.
Save jandrieu/3171645 to your computer and use it in GitHub Desktop.
failing to get $attrs
<?php
header('Content-Type: application/json');
require("oneid.php");
$attrs = OneID_Response();
// here you do whatever you need to log the user in.
session_start();
$_SESSION['email'] = $attrs['ATTR']["personal_info"]['email'];
$_SESSION['attr'] = $attrs;
$_SESSION['uid'] = $attrs['UID'];
// return the redirect to the next page
//echo OneID_Redirect('account.php');
// $_SESSION['attr']
echo "{ \"errorcode\" : 0 , \"error\": \"success\" , \"attr\" : ", json_encode($attrs), "}";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment