So I'm trying to figure out how I can create an icon or text to put next to a banned user's name within a discussion. I'm having a hard time trying to get the role value of a banned user or even trying to figure out if that user has been banned already.
I've set up a test user which has posted several comments on a discussion and have then banned that user. What I want is to figure out how to put some kind of icon or text next to his name to signify that that user has been banned.
I tried using (within discussion/helper_functions.php):
$banned = BanModel::CheckUser($Object->InsertUserID);
but I keep getting a value of 1 each time for all users (banned or not). Any clues on how to find out how I can go about that?
Comments
Don't know why checkuser won't work the way you think it would, unless all have the same last ip address, or email, or name as the test user.
A solution but ....
A really inefficient way to check if person is banned in helper functions.php
on another note: It doesn't make sense to me why you don't look in the banned list and put a date you banned and delete when you want.
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •Create usergrp called banned, assign the ug an id. Echo that id and fire css element. Simple.
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
2 • Off Topic Insightful 2Awesome LOL •that would be quicker if you could pick the usergroup of the ban is not by ip address.
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I can't edit above just meant that would be quicker - what you said 422.
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •don't understand this function @Todd
if called from helper_functions.php
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I did just create a banned user group and put banned users in there and use that usergroup id as reference, but I would still prefer a better solution to grab banned users without having to put them in another usergroup.
Also, like what @peregrine said, it still won't grab users from banned ip addresses.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •if you want to grab users from banned ip addresses just do a lookup of the the authors last ip address and cmpare to the banned user table ip address. It is going to be so intensive on every discussion, it is hardly worth the bother. What is your goal to display some thing in the discussion views or to just find out the names that match the ip addresses. Which you could do outside the program with phpmyadmin and no detriment to the use of your forum. Perhaps when you ban an qp in the future you should put the username associated with it in the notes on the dashboard associiated with banned users.
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
2 • Off Topic 2Insightful Awesome LOL •