简体   繁体   English

Yii hybridauth失败,包括“ User.php”

[英]Yii hybridauth fails including “User.php”

I'm trying to set up hybridAuth module for Yii. 我正在尝试为Yii设置hybridAuth模块。 I did everything exactly as told in http://www.yiiframework.com/extension/hybridauth/ . 我完全按照http://www.yiiframework.com/extension/hybridauth/中的说明进行了所有操作 Also did set up googles key ans secret. 也没有设置谷歌的关键和秘密。 Trying to sign-in with Google the DefaultController tries to create a new User object but fails in Yiibase.php trying to include User.php (427). 尝试使用Google登录时,DefaultController尝试创建一个新的User对象,但在Yiibase.php中尝试包含User.php失败(427)。 I'm using latest 1.1.14 Yii framework. 我正在使用最新的1.1.14 Yii框架。 The yii project is brand new and stock (I mean I haven't screwed up any standard components). yii项目是全新的并且有现货(我的意思是我还没有搞砸任何标准组件)。

Thanks and let me know if I can get you guys any further information. 谢谢,让我知道是否能给您进一步的信息。

the extension is trying to use user extension(I didn't mean use, I meant reached for a user model), 该扩展正在尝试使用用户扩展(我不是说使用,我是指达到用户模型),

try adding user extension to keep records of authenticated users. 尝试添加用户扩展名以保留经过身份验证的用户的记录。

UPDATE: 更新:

on file hybridauth\\controllers on line 64 we have $user = new User; 在第64行的hybridauth\\controllers文件中,我们有$user = new User;

here is what causing the issue, you can use user extensions or use your own user functions. 这是导致问题的原因,您可以使用用户扩展名或使用自己的用户功能。

It doesn't needs the user extension. 它不需要用户扩展。 It's trying to access the User model, wich probably does not exists. 它正在尝试访问用户模型,但可能不存在。 Create a user table and the correspondig model to get it working. 创建一个用户表和对应模型以使其正常工作。

As an alternative you can follow this wiki and do the integration yourself. 或者,您可以按照此Wiki进行集成。

Also I'd like to add that I's recommended by HybridAuth project to use Yii extension HoAuth. 我还要补充一点,HybridAuth项目推荐使用Yii扩展HoAuth。 http://www.yiiframework.com/extension/hoauth/ http://www.yiiframework.com/extension/hoauth/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM