I put a check for that in the updateStatus method in Yiiauth component (inside the module).
So if you run $this->updateStatus($provider,$status); it will check if $provider is in that array you showed, if it is it will set the user status to $status. So you do not have to worry about that.
The array for providers you would like to use, is set in the config, how to configure it is shown on the hybridauth info page. i strongly recommend to read that:)
The second line is error because of the first error, and I dont know why that line would give you an error if the login works, that same Yii::app()->controller->module->config is ran on login to… hmm
Ah, It didnt work for me either first, I found I had typo.
At approximately line 145
public function updateStatus($provider,$status){
$this->newAuth();
//Change to
public function updateStatus($provider,$status){
$hybridauth = $this->newAuth();
You have many good points, I’m not relly good at module making. The social extending model is as you say for most CActiveRecord, I have created a Model class in app/components, so that is not really needed for this Yiiauth module.
Can you tell me where u get this error? it is hopefully solved with just an if statement.
Else, I wouldnt mind if others updated errors they find because I have almost no time at all to work on this currently
I’m sorry I dont know what can cause that error for you… what provider are you logged in
"Trying to get property of non-object" means a $variable is empty, that should contain an object:p I dont know whats diffrent between my code and yours. Perhaps you missed some step?
Haha…I’ve never created a module before so prob aren’t much help on that front, but figured it might be helpful for others trying to use it.
I get the error after clicking on the Twitter provider icon (defautl /yiiauth)…haven’t had a chance to try to fix it yet…but you’re probably right about the “if”…
ok, that was a bit idiotic…the reason I was getting the error was that it was trying to redirect back to the profile page, which has
// Example, ask facebook for friends list
$response = $this->facebookApi('/me/friends');
if($response){
echo "<h1> Example fb api call for friends</h1>";
var_export($response);
}
as the first few lines…I don’t know why it took me so long to realize that the error was actually being thrown by the profile view, and not any of the Yiiauth controllers.
haha Well, good notice, I fix that right away. When you get the error message, you can see the stack trace… in where it almost always shows what line causes the error
The stack trace showed that the error was actually in the Hybridauth file (provider_adapter.php i think), which was the confusing part…either way, definitely my fault, not yours!