| Issue 3: | Cannot get attributes, undefined variable | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hello,
I get an "Undefined variable: attributes" when trying to call the getAttributes() method after a successful authentication, and I think the problem comes from lightOpenID.
Here is the code I use :
if(#user has provided an identifier#) {
$lightOpenID = new \LightOpenID();
$lightOpenID->required = array('namePerson/friendly', 'contact/email');
$lightOpenID->identity = $provider_given_by_user;
header('Location: '.$lightOpenID->authUrl());
die;
}
if(isset($_GET['openid_mode'])) {
$lightOpenID = new \LightOpenID();
if($lightOpenID->validate()) {
header('Content-Type: text/plain');
print_r($lightOpenID->getAttributes());
die;
} else {
die(_('Authentication failed somehow.'));
}
}
And here is the full stack trace :
Undefined variable: attributes
#0 /staging/src/3rdparty/lightopenid/openid.php(523): Logger::handleError(8, 'Undefined varia...', '...
#1 /staging/src/3rdparty/lightopenid/openid.php(559): LightOpenID->getAxAttributes()
#2 /staging/src/UI/Base/Register.php(146): LightOpenID->getAttributes()
My provider is myOpenid.com and I used the version in 22bb9a0 (master at the moment). If you need more information, please ask.
Aug 27, 2010
#1
artefa...@gmail.com
Aug 31, 2010
Thanks for reporting it. It's fixed and commited now.
Status:
Fixed
|