StackIdeas,
My EasySocial site is up and running which is great, but now I have the challenge of administering the site.
I have a lot of users that have created accounts, but then refuse to VERIFY the account. I want to clean up the database and can manually Delete each account from the backend, but this is going to be a on going maintenance headache with 100s.
I would like to write a small app that looks at the account status and the date it was created. If the account has not been verified for over X days, I want to send a command to completely DELETE the Joomla/EasySocial Account and Account Profile. I'm using PayPlans, so I also want to delete the PayPlans subscription and invoice.
I've looked through your Developer Documentation and there isn't any DELETE ACCOUNT option documented.
Looking at the code, would the following work for a specific user_id?
require_once ( JPATH_BASE . 'administrator' . DS . 'components' . DS . 'com_easysocial' . DS . 'includes' . DS . 'user' . DS . 'user.php' );
$user = ES::user( $user_id);
$user->delete();
Looks like that would work, but seems to simple. Wanted to check with you first.
ALSO Please let me know if there is a better option then manual removal.
Thanks for the help.
Dan