- if ($user->state == 'pending') {
- // If the user has never logged in the site, we delete her account.
- XDB::execute('DELETE FROM acounts
- WHERE uid = {?}',
- $user->id());
- } else {
- // It the user has already logged in the site, we notify site
- // administrators that there is a new xnet account without any
- // group.
- $mailer = new PlMailer('xnetgrp/unsubscription.mail.tpl');
- $mailer->assign('user', $user);
- $mailer->assign('groupId', $globals->asso('id'));
- $mailer->assign('groupName', $globals->asso('nom'));
- $mailer->send();
- }