Help me to develope ban User Component..

Elliot Alderson Posted in Component Development 4 years ago

Help me to develope ban User Component.. i know this component already developed by ossn team and included in premium ossn toolkit. but i cant offored ossn pemium toolkit so i have desided to develope this but im not so expert developer... so please help me to develope this component. Thanks!

Replies
us Elliot Alderson Replied 4 years ago

@Roman
Yes why not? I know you are better then me.. so please chack it out if it is possible for you then do it. thanks :D

us Roman Lohov Replied 4 years ago

Elliot Alderson
I will check it out. See if its doable for me.,

us Elliot Alderson Replied 4 years ago

@ Roman
yes bro.. right

us Roman Lohov Replied 4 years ago

I might be dumb, what are you guys working on?

Something like this?
enter image description here

Indonesian Arsalan Shah Replied 4 years ago

Why not you simply fork the OssnBlock? and use login calback to check if user is blocked and login make him stay away?
Those functions you used in code below are from wordpress and will not work in OSSN.

Your component may include following (this is not a full component code just example)

function user_baned_init(){
        ossn_register_callback('user', 'before:login', 'check_user_banstatus');
}
function check_user_banstatus($callback, $type, $params){
    if($params['user']->banned == true){
        ossn_trigger_message("You are banned", 'error');
        redirect(REF);
    }
}
ossn_register_callback('ossn', 'init', 'user_baned_init');

.

us Elliot Alderson Replied 4 years ago

What i have developed i have posted here in the form of imgs. please Help. Thanks!

us Elliot Alderson Replied 4 years ago

Img 1

us Elliot Alderson Replied 4 years ago

Img 2

us Elliot Alderson Replied 4 years ago

Img 3

us Elliot Alderson Replied 4 years ago

Img 4