snugRugBug Posted March 4, 2015 Posted March 4, 2015 I am investigating the possibility of writing a data import script that makes use IPB 4's internal APIs and functions. One example of how this might be useful might be add a few thousand users without having to touch the IPB database directly.I would like this script to be located in a separate directory on the server so that I can use SVN easily, and keep everything nice and modular.What I would like to know is if it possible to access this functionality from my separated script. If I ran init.php in my script, would it serve my desired purpose?Thanks
bfarber Posted March 4, 2015 Posted March 4, 2015 yup. I have custom scripts on a site I am working on that just do things like this require 'init.php' $email = \IPS\Email::buildFromContent( "Email subject", "Email Body" ); $email->send( "someaddress@domain.com"); You can of course do the same thing but adding members instead (by creating new \IPS\Member objects...you can look at our installer under applications/core/sources/Setup/Install.php for an example where we create the first default admin account).
snugRugBug Posted March 16, 2015 Author Posted March 16, 2015 How would one do something equivalent in IPB 3.4.7?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.