首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >HWIOAuthBundle的PathUserResponse错误

HWIOAuthBundle的PathUserResponse错误
EN

Stack Overflow用户
提问于 2013-03-16 03:51:00
回答 1查看 275关注 0票数 0

我的项目几乎一切正常,除了当我以数据库(FOSUserBundle)中没有通信的用户登录(使用facebook)时,我被重定向到/registration/{id},却得到了一个错误:

The form's view data is expected to be an instance of class Naroga\Reader\CommonBundle\Entity\User, but is an instance of class HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse to an instance of Naroga\Reader\CommonBundle\Entity\User.

我还必须重写connect.confirm.html.twig来删除以下行:

代码语言:javascript
复制
{% if userInformation.profilePicture is not empty %}
    <img src="{{ userInformation.profilePicture }}" />
{% endif %}

它说PathUserResponse没有profilePicture方法。我的猜测是我不应该使用PathUserResponse,但我不知道我做错了什么。谁能给我指个方向?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-04-12 21:59:58

HWI/OAuth-Bundle的好心人已经解决了这个问题。我认为我做错了什么,但这些实际上是已知的bug。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15441001

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档