* Copyright 2010 (c) Franck Villaume - Capgemini
* http://fusionforge.org
*
- * This file is part of FusionForge.
- *
- * FusionForge is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * This file is part of FusionForge. FusionForge is free software;
+ * you can redistribute it and/or modify it under the terms of the
+ * GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the Licence, or (at your option)
+ * any later version.
*
* FusionForge is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with FusionForge; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * You should have received a copy of the GNU General Public License along
+ * with FusionForge; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
require_once('../env.inc.php');
require_once $gfcommon.'include/pre.php';
require_once $gfwww.'admin/admin_utils.php';
+// user must be forge admin to proceed
session_require_global_perm ('forge_admin');
-
+
$HTML->header(array('title'=>_('User List')));
-echo '<h1>' . _('User List') . '</h1>';
/**
* performAction() - Updates the indicated user status
* @param string $user_id - the user id to act upon
*/
function performAction($newStatus, $statusString, $user_id) {
- $u =& user_get_object($user_id);
+ $u = user_get_object($user_id);
if (!$u || !is_object($u)) {
exit_error(_('Could Not Get User'),'home');
} elseif ($u->isError()) {
}
function show_users_list ($users, $filter='') {
+ if (!count($users)) {
+ echo '<p>'. _('No such users found') .'</p>';
+ return;
+ }
+
echo '<p>' ._('Key') .':
<span class="active">'._('Active'). '</span>
<span class="deleted">' ._('Deleted') .'</span>
' ',
' ',
' ',
+ ' ',
' '
);
'/admin/userlist.php?sortorder=user_name',
'/admin/userlist.php?sortorder=user_name',
'/admin/userlist.php?sortorder=user_name',
+ '/admin/userlist.php?sortorder=user_name',
'/admin/userlist.php?sortorder=user_name'
);
echo '<td width="15%" style="text-align:center">';
echo ($u->getAddDate() ? date(_('Y-m-d H:i'), $u->getAddDate()) : '-');
echo '</td>';
- echo '<td width="15%" style="text-align:center">'.util_make_link ('/developer/?form_dev='.$u->getID(),_('[DevProfile]')).'</td>';
- echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=activate&user_id='.$u->getID().$filter,_('[Activate]')).'</td>';
- echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=delete&user_id='.$u->getID().$filter,_('[Delete]')).'</td>';
- echo '<td width="15%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=suspend&user_id='.$u->getID().$filter,_('[Suspend]')).'</td>';
+ echo '<td width="12%" style="text-align:center">'.util_make_link ('/developer/?form_dev='.$u->getID(),_('[DevProfile]')).'</td>';
+ echo '<td width="12%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=activate&user_id='.$u->getID().$filter,_('[Activate]')).'</td>';
+ echo '<td width="12%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=delete&user_id='.$u->getID().$filter,_('[Delete]')).'</td>';
+ echo '<td width="12%" style="text-align:center">'.util_make_link ('/admin/userlist.php?action=suspend&user_id='.$u->getID().$filter,_('[Suspend]')).'</td>';
+ echo '<td width="12%" style="text-align:center">'.util_make_link ('/admin/passedit.php?user_id='.$u->getID().$filter,_('[Change PW]')).'</td>';
echo '</tr>';
$count ++;
}
-
+
echo $GLOBALS['HTML']->listTableBottom();
}
show_users_list (user_get_objects(util_result_column_to_array($res,0)),$filter);
} else {
/*
- Show list for one group
+ Show list for one project
*/
$project = group_get_object($group_id) ;
print "<strong>" . $project->getPublicName() . "</strong></p>";