User Register Error on Joomla 3

If you search by error code: PHP Fatal error: Call to a member function where() on a non-object in /home/username/sitename/joomla/components/com_users/models/registration.php on line 521 and landed here, you are very closed to the solutions. When a new user tried to register,...