FusionForge-5.3:
* Widget: MyArtifacts Enhancement : add monitored artifacts (TrivialDev)
* Trackers: Attachements moved to filesystem to allow larger attachments & reduce DB size (Alcatel-Lucent)
+* Users: notify admins when user has validated his account (TrivialDev)
FusionForge-5.2:
* Docman: inject zip as a tree (Capgemini)
* Copyright 1999-2001, VA Linux Systems, Inc.
* Copyright 2009-2010, Roland Mas
* Copyright 2011, Franck Villaume - Capgemini
+ * Copyright 2012, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
break;
}
}
+
+ /**
+ * setAdminNotification - send an email to all admins (used in verify.php)
+ *
+ * @return boolean True
+ */
+ function setAdminNotification() {
+ $admins = RBACEngine::getInstance()->getUsersByAllowedAction('forge_admin', -1);
+ foreach ($admins as $admin) {
+ $admin_email = $admin->getEmail();
+ setup_gettext_for_user($admin);
+ $message = sprintf(_('New User %1$s registered and validated
+Full Name: %2$s
+Email: %3$s
+'),
+ $this->getUnixName() , $this->getRealName(), $this->getEmail());
+ util_send_message($admin_email, sprintf(_('New %1$s User'), forge_get_config ('forge_name')), $message);
+ setup_gettext_from_context();
+ }
+ return true;
+ }
}
/*
* email.
*
* Copyright 1999-2001 (c) VA Linux Systems
- * Copyright 2010 (c) Franck Villaume
+ * Copyright 2010, Franck Villaume - Capgemini
+ * Copyright 2012, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
if (!$u->setStatus('A')) {
exit_error( _('Error while activiting account').': '.$u->getErrorMessage(),'my');
+ } else {
+ if (forge_get_config('user_notification_on_activation')) {
+ $u->setAdminNotification();
+ }
}
session_redirect("/account/first.php");