XF 2.0 What method gets called when banning of user is completed?

ludak

Active member
I would like to create an add-on that would allow me to do some other tasks when the user is banned (automatically or manually)/ Basically I would like to overwrite that method do to another step after the banning is complete?

What is the method that does this? What would I need to overwrite?

I only see the Admin/COntrollers/Banning class. Which method would be good to overwrite?

Thanks,
ps. I am newbie in writing add-ons and have not done php in ages, so need to get used to this :) But I want to create several add-ons that I believe it would help community.
 
Last edited:
I think I figured this part out. Is there a decent review of what should the structure of the add-on look like?
I see at some addons there is XF/Repository folder and then the classes for the addon are there.
Could I simply put the class in the root of the addon?

Is there some kind of structure that would be great to follow I am wondering.


Reading this:
https://xenforo.com/xf2-docs/dev/general-concepts/

I think I found an answer :)

Although, strictly speaking, you can place your extended classes wherever you like within your add-on directory, it is recommended to put extended classes in a directory which easily identifies a) the add-on the class belongs to b) the type of class being extended and c) the name of the class being extended. In the following examples, we are extending the public XF Member controller so we will place our extended class in the following path: src/addons/Demo/XF/Pub/Controller/Member.php.

Thanks
 
Last edited:
Back
Top Bottom