Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Best Approach To Implement "ban User" Feature

$
0
0
Hello.

I am trying to figure out what is the best way to implement user banning. The requirements are as follows:

  • Upon ban the user must not be able to log in to site again.
  • If the user currently logged in he/she must be forcefully logged out
  • "Remember me" feature is implemented in my application, so banned user also should not be able to autologin using cookies


Also what is the right way to organize keeping of ban info in the db (assuming the requests will be made on each page request) - i.e. in some indexed "status" field of "users" table along with other user data or in a separate table (I'm using MySQL 5.5).

I have read the following posts but didn't get a clear idea unfortunately:

http://www.yiiframework.com/forum/index.php/topic/22986-ban-user/page__p__112188__hl__banned#entry112188

http://www.yiiframework.com/forum/index.php/topic/15864-force-logout-with-auto-login-and-session/page__p__78752__hl__banned#entry78752

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>