dongqiao8417 2012-03-26 10:43
浏览 39

CodeIgniter ionAuth库 - 无法获取用户对象?

I am using Codeigniter 2.1 with the latest version of IonAuth (

I am having a problem getting the user object using the method described in the documentation, in the previous version of IonAuth this worked fine - but now this doesn't seem to work - see the screenshots below to see what I mean.

All I am doing is just outputting this in the code :-


Any ideas what I am doing wrong or is there a bug in the latest iteration of IonAuth?

P.S The first link is how it looks now - the latter link is how it used to look (grabbed from an existing project) - I know I could just downgrade the IonAuth to the older version but i'd prefer to keep it if possible.

  • 写回答

1条回答 默认 最新

  • dongyi0210 2012-03-26 13:48

    Check the usage here:

    Just add ->row() to your code and this will work, so instead of "$this->ion_auth->user();" you need to use "$this->ion_auth->user()->row();".

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 我需要全国每个城市的最新小区名字等数据。
  • ¥15 开发一个小区生态的小程序
  • ¥15 MddBootstrapInitialize2失败
  • ¥15 LCD Flicker
  • ¥15 Spring MVC项目,访问不到相应的控制器方法
  • ¥15 esp32在micropython环境下使用ssl/tls连接mqtt服务器出现以下报错Connected on发生意外错误: 5无法连接到 MQTT 代理,如何解决?
  • ¥15 关于#genesiscsheel#的问题,如何解决?
  • ¥15 Android aidl for hal
  • ¥15 STM32CubeIDE下载程序报错
  • ¥15 微信好友如何转变为会员系统?(相关搜索:小程序)