search

Home  >  Q&A  >  body text

User comment question

Teacher, the user_id value under the comment should be $Think.session.user_id. If you do that, the user_id of the comment will become the user_id of the published article.

I think it should be in the controller First call the isLogin method in the Base controller to determine whether the user is logged in, and then perform the comment operation. Am I right to say that? Teacher.

新新新新生新新新新生2202 days ago1435

reply all(2)I'll reply

  • 天蓬老师

    天蓬老师2019-01-24 11:24:37

    Your analysis makes sense, you should just use a set of sessions

    reply
    0
  • Cancelreply