Call to a member function setPassword() on a non-object in /vendor/socalnick/scn-social-auth/src/ScnSocialAuth/Authentication/Adapter/HybridAuth.php

I was playing with ZfcUser together with ScnSocialAuth, ScnSocialAuthDoctrineORM and BjyAuthorize using a custom entity – mostly based on the User entity provided by BjyAuthorize – and ended up with the following fatal error:

Fatal error: Call to a member function setPassword() 
on a non-object in .../vendor/socalnick/scn-social-auth/src
  /ScnSocialAuth/Authentication/Adapter/HybridAuth.php 
  on line 441

This problem is caused by the entity, I’ve found a suggestion here. The solution is simple: make sure all setters of the entity return $this.

Leave a Reply