dou70260 2018-09-07 13:11
浏览 26

从用户表社区身份验证添加额外的身份验证变量

I added a new column "dummy" to usertable and made changes in get_auth_data() declared in Auth_Controller_set_user_variables()

But still unable to set authentication variable.

NOTE I Know there is a define way to pull profile data in community autho BUT for single column i don't want to create a extra table.

  • 写回答

1条回答 默认 最新

  • douduan4116 2018-09-17 05:52
    关注

    Originally Answered By @skunkbad THANKS A LOT

    1. You add your field to the user table.

    2. You modify your existing auth model (not Community Auth's auth model). If you don't have one, make one and declare it.

    3. Modify your auth model's get_auth_data and check_login_status methods to return your new field.
    4. If you haven't already, extend the _set_user_variables method that is in Auth_Controller by adding it to MY_Controller. Add your new field to controller properties, config values, or whatever you want.
    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大