Help me to develope ban User Component..

Elliot Alderson Posted in Component Development 2 months 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 2 months 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 2 months ago

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

us Elliot Alderson Replied 2 months ago

@ Roman
yes bro.. right

us Roman Lohov Replied 2 months ago

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

Something like this?
enter image description here

German Arsalan Shah Replied 2 months 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 2 months ago

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

us Elliot Alderson Replied 2 months ago

Img 1

us Elliot Alderson Replied 2 months ago

Img 2

us Elliot Alderson Replied 2 months ago

Img 3

us Elliot Alderson Replied 2 months ago

Img 4