Hybridauth: Property "user.username" Is Not Defined


am having a site that needs to allow user to comment from their Social Network IDs (facebook, twitter et al). I have looked at available extensions and found this one easier to incorporate. However I tried with facebook and all I keep getting is “Property “User.username” is not defined”. I cannot get traceback like any other Yii (logging is enabled) so I cannot trace the origin of the error. Looking at its table, I cannot see anything that might cause and I don’t see any user model in it directory. So am confused.

Little docs for extension is another setback, so am stuck. Now to cust story short my questions are:

  • What causes the issue (or might be the cause)?

  • Is there another easier and documented way than using complicated extensions like HoAuth? I don’t like to temper with controllers but If no other methods exists I will have to!

Thanks in advance


I can suggest you using my usr extension that has HybridAuth included. If you’ll like it I already ported it to Yii 2.

Has your extension any documentation?

By the way, if you use hybridauth lib, be advised that new mantainers there and they are applying a lot of fixes now. New release is coming after long silence.

There’s a README file and I intive everybody to post issues on Github.

Sorry, I am too new to Yii :(

Guess I am not able to integrate your moduke right way so far. May you point me to some sample code? I gues that I need co create my own UserIdentity class, however it is not clear for me which class it should extend? As well it is not so sipmle with RBAC, could you seggest right RBAC management extension?

I wish to keep your module as git subproject, but there are some problems too, hybrid need to be updated and I need some extra providers. Guess, I have to fork it.

Sorry bor stupid questions!

You should use composer, for me it’s easier to manage than git submodules. Also, you can easily fork some package and use your own branch instead of the main one, optionally switching back after you made a pull-request and your changes are accepted.

I will update HybridAuth when there’s a new release but I probably should stop including it and just use composer, I did it already in my Yii 2 port.

As for RBAC I’d recommend auth. I’m working on a fork or it right now.