5 * Copyright 2011, Franck Villaume - Capgemini
6 * Copyright 2011, Franck Villaume - TrivialDev
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 global $mantisbt; // the mantisbt object
28 $confArr['mantisbt_user'] = getStringFromRequest('mantisbt_user');
29 $confArr['mantisbt_password'] = getStringFromRequest('mantisbt_password');
30 $confArr['mantisbtcreate'] = getIntFromRequest('mantisbtcreate');
31 $confArr['mantisbt_useglobal'] = getIntFromRequest('mantisbtuseglobal');
33 if (!$mantisbt->initializeUser($confArr)) {
34 $error_msg = _('Failed to initialize user.').' '.$user->getErrorMessage();
35 session_redirect('/plugins/mantisbt/?type=user&pluginname='.$mantisbt->name.'&error_msg='.urlencode($error_msg));
38 $feedback = _('MantisBT User successfully initialized.');
39 session_redirect('/plugins/mantisbt/?type=user&pluginname='.$mantisbt->name.'&feedback='.urlencode($feedback));