This repository was archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
This repository was archived by the owner on Aug 16, 2022. It is now read-only.
Attibutes Mapping not used #53
Copy link
Copy link
Open
Labels
Description
Hy,
After installing and setting parameter, I can't login/signin.
Every time I get error like :
2014/09/21 12:38:48 [error] [exception.CException] exception 'CException' with message 'Property "User.email" is not defined.' in website/protected/vendor/framework/base/CComponent.php:130
Stack trace:
#0 website/protected/vendor/framework/db/ar/CActiveRecord.php(145): CComponent->__get('email')
#1 website/protected/extensions/hoauth/HOAuthAction.php(234): CActiveRecord->__get('email')
#2 website/protected/extensions/hoauth/HOAuthAction.php(163): HOAuthAction->getAccessCode()
#3 website/protected/extensions/hoauth/HOAuthAction.php(136): HOAuthAction->oAuth('Live')
#4 website/protected/vendor/framework/web/actions/CAction.php(76): HOAuthAction->run()
#5 website/protected/vendor/framework/web/CController.php(308): CAction->runWithParams(Array)
#6 website/protected/vendor/framework/web/CController.php(286): CController->runAction(Object(HOAuthAction))
#7 website/protected/vendor/framework/web/CController.php(265): CController->runActionWithFilters(Object(HOAuthAction), Array)
#8 website/protected/vendor/framework/web/CWebApplication.php(282): CController->run('oauth')
#9 website/protected/vendor/framework/web/CWebApplication.php(141): CWebApplication->runController('site/oauth')
#10 website/protected/vendor/framework/base/CApplication.php(180): CWebApplication->processRequest()
#11 website/index.php(13): CApplication->run()
#12 {main}
REQUEST_URI=/site/oauth?provider=Live
After some research doing a CVardump to the $user give :
[trace] [application] Test User: User#1
(
[CActiveRecord:_new] => false
[CActiveRecord:_attributes] => array
(
'USER_ID' => '2'
'USERSTATE_ID' => '2'
'USERCLASS_ID' => '3'
'USER_LASTNAME' => 'LASTTest'
'USER_FORNAME' => 'FORTest'
'USER_EMAIL' => 'test.test@test.fr'
'USER_PASSWORD' => 'hashedpassword'
)
[CActiveRecord:_related] => array()
[CActiveRecord:_c] => null
[CActiveRecord:_pk] => '2'
[CActiveRecord:_alias] => 't'
[CModel:_errors] => array()
[CModel:_validators] => null
[CModel:_scenario] => 'update'
[CComponent:_e] => null
[CComponent:_m] => null
)
But even using $user->_emailAttribute or $user->USER_EMAIL give a null value making a null identity etc..
All other part of website run, so I don't know why here...
PS: will be good to precise what getId / getName must return in UserIdentity for who don't use yii-user.
My Config:
'oauth' => array(
// the list of additional properties of this action is below
'class' => 'ext.hoauth.HOAuthAction',
'model' => 'User',
// model attribute => profile attribute
'attributes' => array(
'USER_EMAIL' => 'email',
'USER_FORNAME' => 'firstName',
'USER_LASTNAME' => 'lastName',
),
),
System Spec :
PHP 5.4.33
Yii yii-1.1.15.022a51
hoauth 1.2.5
Reactions are currently unavailable