search

Home  >  Q&A  >  body text

session control

How to implement single sign-on. Only by logging in can you access other web interfaces. How can the management backend see that a user is online and can force him to log off?

2297 days ago1210

reply all(4)I'll reply

  • Autumn

    Autumn2018-10-11 11:19:46

    在你要限制的页面加入<?php if($_SESSION('用户信息')){  } ?>,然后在用户登录的时候在用户表加个字段is_login,
    如果登录了为1,没有登录为0,然后你就可以在后台看到了


    reply
    1
  • Can I add a friend? Please tell me. I don’t understand this. 3850659802

    · 2018-10-15 12:12:09

    Hello, can you add me as a friend? 3850659802

    · 2018-11-25 10:12:47
  • Don't cry

    Don't cry2018-10-08 16:46:04

    Use js to continuously request to obtain the current user login status. The background uses the interface to determine the IP address of each user's login. If there are duplicates, record them. During background operations, the front-end js is also required to continuously request to determine whether to force offline.

    reply
    0
  • Cancelreply