source: branches/1.7/admin/user_list.php @ 26951

Last change on this file since 26951 was 2202, checked in by rub, 16 years ago

Replace old use of $lang by l10n function.

Merge BSF 2200:2201 into branch-1_7

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 22.4 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | PhpWebGallery - a PHP based picture gallery                           |
4// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
6// +-----------------------------------------------------------------------+
7// | file          : $Id: user_list.php 2202 2008-01-30 22:16:01Z rub $
8// | last update   : $Date: 2008-01-30 22:16:01 +0000 (Wed, 30 Jan 2008) $
9// | last modifier : $Author: rub $
10// | revision      : $Revision: 2202 $
11// +-----------------------------------------------------------------------+
12// | This program is free software; you can redistribute it and/or modify  |
13// | it under the terms of the GNU General Public License as published by  |
14// | the Free Software Foundation                                          |
15// |                                                                       |
16// | This program is distributed in the hope that it will be useful, but   |
17// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
18// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
19// | General Public License for more details.                              |
20// |                                                                       |
21// | You should have received a copy of the GNU General Public License     |
22// | along with this program; if not, write to the Free Software           |
23// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
24// | USA.                                                                  |
25// +-----------------------------------------------------------------------+
26
27/**
28 * Add users and manage users list
29 */
30
31// +-----------------------------------------------------------------------+
32// |                              functions                                |
33// +-----------------------------------------------------------------------+
34
35/**
36 * returns a list of users depending on page filters (in $_GET)
37 *
38 * Each user comes with his related informations : id, username, mail
39 * address, list of groups.
40 *
41 * @return array
42 */
43function get_filtered_user_list()
44{
45  global $conf, $page;
46
47  $users = array();
48
49  // filter
50  $filter = array();
51
52  if (isset($_GET['username']) and !empty($_GET['username']))
53  {
54    $username = str_replace('*', '%', $_GET['username']);
55    if (function_exists('mysql_real_escape_string'))
56    {
57      $filter['username'] = mysql_real_escape_string($username);
58    }
59    else
60    {
61      $filter['username'] = mysql_escape_string($username);
62    }
63  }
64
65  if (isset($_GET['group'])
66      and -1 != $_GET['group']
67      and is_numeric($_GET['group']))
68  {
69    $filter['group'] = $_GET['group'];
70  }
71
72  if (isset($_GET['status'])
73      and in_array($_GET['status'], get_enums(USER_INFOS_TABLE, 'status')))
74  {
75    $filter['status'] = $_GET['status'];
76  }
77
78  // how to order the list?
79  $order_by = 'id';
80  if (isset($_GET['order_by'])
81      and in_array($_GET['order_by'], array_keys($page['order_by_items'])))
82  {
83    $order_by = $_GET['order_by'];
84  }
85
86  $direction = 'ASC';
87  if (isset($_GET['direction'])
88      and in_array($_GET['direction'], array_keys($page['direction_items'])))
89  {
90    $direction = strtoupper($_GET['direction']);
91  }
92
93  // search users depending on filters and order
94  $query = '
95SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
96                u.'.$conf['user_fields']['username'].' AS username,
97                u.'.$conf['user_fields']['email'].' AS email,
98                ui.status,
99                ui.adviser,
100                ui.enabled_high
101  FROM '.USERS_TABLE.' AS u
102    INNER JOIN '.USER_INFOS_TABLE.' AS ui
103      ON u.'.$conf['user_fields']['id'].' = ui.user_id
104    LEFT JOIN '.USER_GROUP_TABLE.' AS ug
105      ON u.'.$conf['user_fields']['id'].' = ug.user_id
106  WHERE u.'.$conf['user_fields']['id'].' > 0';
107  if (isset($filter['username']))
108  {
109    $query.= '
110  AND u.'.$conf['user_fields']['username'].' LIKE \''.$filter['username'].'\'';
111  }
112  if (isset($filter['group']))
113  {
114    $query.= '
115    AND ug.group_id = '.$filter['group'];
116  }
117  if (isset($filter['status']))
118  {
119    $query.= '
120    AND ui.status = \''.$filter['status']."'";
121  }
122  $query.= '
123  ORDER BY '.$order_by.' '.$direction.'
124;';
125
126  $result = pwg_query($query);
127  while ($row = mysql_fetch_array($result))
128  {
129    $user = $row;
130    $user['groups'] = array();
131
132    array_push($users, $user);
133  }
134
135  // add group lists
136  $user_ids = array();
137  foreach ($users as $i => $user)
138  {
139    $user_ids[$i] = $user['id'];
140  }
141  $user_nums = array_flip($user_ids);
142
143  if (count($user_ids) > 0)
144  {
145    $query = '
146SELECT user_id, group_id
147  FROM '.USER_GROUP_TABLE.'
148  WHERE user_id IN ('.implode(',', $user_ids).')
149;';
150    $result = pwg_query($query);
151    while ($row = mysql_fetch_array($result))
152    {
153      array_push(
154        $users[$user_nums[$row['user_id']]]['groups'],
155        $row['group_id']
156        );
157    }
158  }
159
160  return $users;
161}
162
163// +-----------------------------------------------------------------------+
164// |                           initialization                              |
165// +-----------------------------------------------------------------------+
166
167if (!defined('PHPWG_ROOT_PATH'))
168{
169  die('Hacking attempt!');
170}
171
172include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
173
174// +-----------------------------------------------------------------------+
175// | Check Access and exit when user status is not ok                      |
176// +-----------------------------------------------------------------------+
177check_status(ACCESS_ADMINISTRATOR);
178
179$page['order_by_items'] = array(
180  'id' => l10n('registration_date'),
181  'username' => l10n('Username')
182  );
183
184$page['direction_items'] = array(
185  'asc' => l10n('ascending'),
186  'desc' => l10n('descending')
187  );
188
189// +-----------------------------------------------------------------------+
190// |                              add a user                               |
191// +-----------------------------------------------------------------------+
192
193if (isset($_POST['submit_add']))
194{
195  $page['errors'] = register_user(
196    $_POST['login'], $_POST['password'], $_POST['email'], false);
197
198  if (count($page['errors']) == 0)
199  {
200    array_push(
201      $page['infos'],
202      sprintf(
203        l10n('user "%s" added'),
204        $_POST['login']
205        )
206      );
207  }
208}
209
210// +-----------------------------------------------------------------------+
211// |                               user list                               |
212// +-----------------------------------------------------------------------+
213
214$page['filtered_users'] = get_filtered_user_list();
215
216// +-----------------------------------------------------------------------+
217// |                            selected users                             |
218// +-----------------------------------------------------------------------+
219
220if (isset($_POST['delete']) or isset($_POST['pref_submit']))
221{
222  $collection = array();
223
224  switch ($_POST['target'])
225  {
226    case 'all' :
227    {
228      foreach($page['filtered_users'] as $local_user)
229      {
230        array_push($collection, $local_user['id']);
231      }
232      break;
233    }
234    case 'selection' :
235    {
236      if (isset($_POST['selection']))
237      {
238        $collection = $_POST['selection'];
239      }
240      break;
241    }
242  }
243
244  if (count($collection) == 0)
245  {
246    array_push($page['errors'], l10n('Select at least one user'));
247  }
248}
249
250// +-----------------------------------------------------------------------+
251// |                             delete users                              |
252// +-----------------------------------------------------------------------+
253if (isset($_POST['delete']) and count($collection) > 0)
254{
255  if (in_array($conf['guest_id'], $collection))
256  {
257    array_push($page['errors'], l10n('Guest cannot be deleted'));
258  }
259  if (($conf['guest_id'] != $conf['default_user_id']) and
260      in_array($conf['default_user_id'], $collection))
261  {
262    array_push($page['errors'], l10n('Default user cannot be deleted'));
263  }
264  if (in_array($conf['webmaster_id'], $collection))
265  {
266    array_push($page['errors'], l10n('Webmaster cannot be deleted'));
267  }
268  if (in_array($user['id'], $collection))
269  {
270    array_push($page['errors'], l10n('You cannot delete your account'));
271  }
272
273  if (count($page['errors']) == 0)
274  {
275    if (isset($_POST['confirm_deletion']) and 1 == $_POST['confirm_deletion'])
276    {
277      foreach ($collection as $user_id)
278      {
279        delete_user($user_id);
280      }
281      array_push(
282        $page['infos'],
283        l10n_dec(
284          '%d user deleted', '%d users deleted',
285          count($collection)
286          )
287        );
288      foreach ($page['filtered_users'] as $filter_key => $filter_user)
289      {
290        if (in_array($filter_user['id'], $collection))
291        {
292          unset($page['filtered_users'][$filter_key]);
293        }
294      }
295    }
296    else
297    {
298      array_push($page['errors'], l10n('You need to confirm deletion'));
299    }
300  }
301}
302
303// +-----------------------------------------------------------------------+
304// |                       preferences form submission                     |
305// +-----------------------------------------------------------------------+
306
307if (isset($_POST['pref_submit']) and count($collection) > 0)
308{
309  if (-1 != $_POST['associate'])
310  {
311    $datas = array();
312
313    $query = '
314SELECT user_id
315  FROM '.USER_GROUP_TABLE.'
316  WHERE group_id = '.$_POST['associate'].'
317;';
318    $associated = array_from_query($query, 'user_id');
319
320    $associable = array_diff($collection, $associated);
321
322    if (count($associable) > 0)
323    {
324      foreach ($associable as $item)
325      {
326        array_push($datas,
327                   array('group_id'=>$_POST['associate'],
328                         'user_id'=>$item));
329      }
330
331      mass_inserts(USER_GROUP_TABLE,
332                   array('group_id', 'user_id'),
333                   $datas);
334    }
335  }
336
337  if (-1 != $_POST['dissociate'])
338  {
339    $query = '
340DELETE FROM '.USER_GROUP_TABLE.'
341  WHERE group_id = '.$_POST['dissociate'].'
342  AND user_id IN ('.implode(',', $collection).')
343';
344    pwg_query($query);
345  }
346
347  // properties to set for the collection (a user list)
348  $datas = array();
349  $dbfields = array('primary' => array('user_id'), 'update' => array());
350
351  $formfields =
352    array('nb_image_line', 'nb_line_page', 'template', 'language',
353          'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
354          'show_nb_hits', 'maxheight', 'status', 'enabled_high');
355
356  $true_false_fields = array('expand', 'show_nb_comments',
357                       'show_nb_hits', 'enabled_high');
358  if ($conf['allow_adviser'])
359  {
360    array_push($formfields, 'adviser');
361    array_push($true_false_fields, 'adviser');
362  }
363
364  foreach ($formfields as $formfield)
365  {
366    // special for true/false fields
367    if (in_array($formfield, $true_false_fields))
368    {
369      $test = $formfield;
370    }
371    else
372    {
373      $test = $formfield.'_action';
374    }
375
376    if ($_POST[$test] != 'leave')
377    {
378      array_push($dbfields['update'], $formfield);
379    }
380  }
381
382  // updating elements is useful only if needed...
383  if (count($dbfields['update']) > 0)
384  {
385    $datas = array();
386
387    foreach ($collection as $user_id)
388    {
389      $data = array();
390      $data['user_id'] = $user_id;
391
392      // TODO : verify if submited values are semanticaly correct
393      foreach ($dbfields['update'] as $dbfield)
394      {
395        // if the action is 'unset', the key won't be in row and
396        // mass_updates function will set this field to NULL
397        if (in_array($dbfield, $true_false_fields)
398            or 'set' == $_POST[$dbfield.'_action'])
399        {
400          $data[$dbfield] = $_POST[$dbfield];
401        }
402      }
403
404      // special users checks
405      if
406        (
407          ($conf['webmaster_id'] == $user_id) or
408          ($conf['guest_id'] == $user_id) or
409          ($conf['default_user_id'] == $user_id)
410        )
411      {
412        // status must not be changed
413        if (isset($data['status']))
414        {
415          if ($conf['webmaster_id'] == $user_id)
416          {
417            $data['status'] = 'webmaster';
418          }
419          else
420          {
421            $data['status'] = 'guest';
422          }
423        }
424
425        // could not be adivser
426        if (isset($data['adviser']))
427        {
428          $data['adviser'] = 'false';
429        }
430      }
431
432      array_push($datas, $data);
433    }
434
435    mass_updates(USER_INFOS_TABLE, $dbfields, $datas);
436  }
437
438  redirect(
439    PHPWG_ROOT_PATH.
440    'admin.php'.
441    get_query_string_diff(array(), false)
442    );
443}
444
445// +-----------------------------------------------------------------------+
446// |                              groups list                              |
447// +-----------------------------------------------------------------------+
448
449$groups = array();
450
451$query = '
452SELECT id, name
453  FROM '.GROUPS_TABLE.'
454  ORDER BY name ASC
455;';
456$result = pwg_query($query);
457
458while ($row = mysql_fetch_array($result))
459{
460  $groups[$row['id']] = $row['name'];
461}
462
463// +-----------------------------------------------------------------------+
464// |                             template init                             |
465// +-----------------------------------------------------------------------+
466
467$template->set_filenames(array('user_list'=>'admin/user_list.tpl'));
468
469$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
470
471if (isset($_GET['start']) and is_numeric($_GET['start']))
472{
473  $start = $_GET['start'];
474}
475else
476{
477  $start = 0;
478}
479
480$template->assign_vars(
481  array(
482    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=user_list',
483
484    'F_ADD_ACTION' => $base_url,
485    'F_USERNAME' => @htmlentities($_GET['username']),
486    'F_FILTER_ACTION' => PHPWG_ROOT_PATH.'admin.php'
487    ));
488
489if (isset($_GET['id']))
490{
491  $template->assign_block_vars('session', array('ID' => $_GET['id']));
492}
493
494// Hide radio-button if not allow to assign adviser
495if ($conf['allow_adviser'])
496{
497  $template->assign_block_vars('adviser', array());
498}
499
500foreach ($page['order_by_items'] as $item => $label)
501{
502  $selected = (isset($_GET['order_by']) and $_GET['order_by'] == $item) ?
503    'selected="selected"' : '';
504  $template->assign_block_vars(
505    'order_by',
506    array(
507      'VALUE' => $item,
508      'CONTENT' => $label,
509      'SELECTED' => $selected
510      ));
511}
512
513foreach ($page['direction_items'] as $item => $label)
514{
515  $selected = (isset($_GET['direction']) and $_GET['direction'] == $item) ?
516    'selected="selected"' : '';
517  $template->assign_block_vars(
518    'direction',
519    array(
520      'VALUE' => $item,
521      'CONTENT' => $label,
522      'SELECTED' => $selected
523      ));
524}
525
526$blockname = 'group_option';
527
528$template->assign_block_vars(
529  $blockname,
530  array(
531    'VALUE'=> -1,
532    'CONTENT' => '------------',
533    'SELECTED' => ''
534    ));
535
536foreach ($groups as $group_id => $group_name)
537{
538  $selected = (isset($_GET['group']) and $_GET['group'] == $group_id) ?
539    'selected="selected"' : '';
540  $template->assign_block_vars(
541    $blockname,
542    array(
543      'VALUE' => $group_id,
544      'CONTENT' => $group_name,
545      'SELECTED' => $selected
546      ));
547}
548
549$blockname = 'status_option';
550
551$template->assign_block_vars(
552  $blockname,
553  array(
554    'VALUE'=> -1,
555    'CONTENT' => '------------',
556    'SELECTED' => ''
557    ));
558
559foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
560{
561  $selected = (isset($_GET['status']) and $_GET['status'] == $status) ?
562    'selected="selected"' : '';
563  $template->assign_block_vars(
564    $blockname,
565    array(
566      'VALUE' => $status,
567      'CONTENT' => $lang['user_status_'.$status],
568      'SELECTED' => $selected
569      ));
570}
571
572if (isset($_POST['pref_submit']))
573{
574//  echo '<pre>'; print_r($_POST); echo '</pre>';
575  $template->assign_vars(
576    array(
577      'ADVISER_YES' => 'true' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '',
578      'ADVISER_NO' => 'false' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '',
579      'NB_IMAGE_LINE' => $_POST['nb_image_line'],
580      'NB_LINE_PAGE' => $_POST['nb_line_page'],
581      'MAXWIDTH' => $_POST['maxwidth'],
582      'MAXHEIGHT' => $_POST['maxheight'],
583      'RECENT_PERIOD' => $_POST['recent_period'],
584      'EXPAND_YES' => 'true' == $_POST['expand'] ? 'checked="checked"' : '',
585      'EXPAND_NO' => 'false' == $_POST['expand'] ? 'checked="checked"' : '',
586      'SHOW_NB_COMMENTS_YES' =>
587        'true' == $_POST['show_nb_comments'] ? 'checked="checked"' : '',
588      'SHOW_NB_COMMENTS_NO' =>
589        'false' == $_POST['show_nb_comments'] ? 'checked="checked"' : '',
590      'SHOW_NB_HITS_YES' =>
591        'true' == $_POST['show_nb_hits'] ? 'checked="checked"' : '',
592      'SHOW_NB_HITS_NO' =>
593        'false' == $_POST['show_nb_hits'] ? 'checked="checked"' : '',
594      'ENABLED_HIGH_YES' => 'true' == $_POST['enabled_high'] ? 'checked="checked"' : '',
595      'ENABLED_HIGH_NO' => 'false' == $_POST['enabled_high'] ? 'checked="checked"' : '',
596      ));
597}
598else
599{
600  $default_user = get_default_user_info(true);
601  $template->assign_vars(
602    array(
603      'NB_IMAGE_LINE' => $default_user['nb_image_line'],
604      'NB_LINE_PAGE' => $default_user['nb_line_page'],
605      'MAXWIDTH' => $default_user['maxwidth'],
606      'MAXHEIGHT' => $default_user['maxheight'],
607      'RECENT_PERIOD' => $default_user['recent_period'],
608      ));
609}
610
611$blockname = 'template_option';
612
613foreach (get_pwg_themes() as $pwg_template)
614{
615  if (isset($_POST['pref_submit']))
616  {
617    $selected = $_POST['template']==$pwg_template ? 'selected="selected"' : '';
618  }
619  else if (get_default_template() == $pwg_template)
620  {
621    $selected = 'selected="selected"';
622  }
623  else
624  {
625    $selected = '';
626  }
627
628  $template->assign_block_vars(
629    $blockname,
630    array(
631      'VALUE'=> $pwg_template,
632      'CONTENT' => $pwg_template,
633      'SELECTED' => $selected
634      ));
635}
636
637$blockname = 'language_option';
638
639foreach (get_languages() as $language_code => $language_name)
640{
641  if (isset($_POST['pref_submit']))
642  {
643    $selected = $_POST['language']==$language_code ? 'selected="selected"':'';
644  }
645  else if (get_default_language() == $language_code)
646  {
647    $selected = 'selected="selected"';
648  }
649  else
650  {
651    $selected = '';
652  }
653
654  $template->assign_block_vars(
655    $blockname,
656    array(
657      'VALUE'=> $language_code,
658      'CONTENT' => $language_name,
659      'SELECTED' => $selected
660      ));
661}
662
663$blockname = 'pref_status_option';
664
665foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
666{
667  if (isset($_POST['pref_submit']))
668  {
669    $selected = $_POST['status'] == $status ? 'selected="selected"' : '';
670  }
671  else if ('normal' == $status)
672  {
673    $selected = 'selected="selected"';
674  }
675  else
676  {
677    $selected = '';
678  }
679
680  // Only status <= can be assign
681  if (is_autorize_status(get_access_type_status($status)))
682  {
683    $template->assign_block_vars(
684      $blockname,
685      array(
686        'VALUE' => $status,
687        'CONTENT' => $lang['user_status_'.$status],
688        'SELECTED' => $selected
689        ));
690  }
691}
692
693// associate
694$blockname = 'associate_option';
695
696$template->assign_block_vars(
697  $blockname,
698  array(
699    'VALUE'=> -1,
700    'CONTENT' => '------------',
701    'SELECTED' => ''
702    ));
703
704foreach ($groups as $group_id => $group_name)
705{
706  if (isset($_POST['pref_submit']))
707  {
708    $selected = $_POST['associate'] == $group_id ? 'selected="selected"' : '';
709  }
710  else
711  {
712    $selected = '';
713  }
714
715  $template->assign_block_vars(
716    $blockname,
717    array(
718      'VALUE' => $group_id,
719      'CONTENT' => $group_name,
720      'SELECTED' => $selected
721      ));
722}
723
724// dissociate
725$blockname = 'dissociate_option';
726
727$template->assign_block_vars(
728  $blockname,
729  array(
730    'VALUE'=> -1,
731    'CONTENT' => '------------',
732    'SELECTED' => ''
733    ));
734
735foreach ($groups as $group_id => $group_name)
736{
737  if (isset($_POST['pref_submit']))
738  {
739    $selected = $_POST['dissociate'] == $group_id ? 'selected="selected"' : '';
740  }
741  else
742  {
743    $selected = '';
744  }
745
746  $template->assign_block_vars(
747    $blockname,
748    array(
749      'VALUE' => $group_id,
750      'CONTENT' => $group_name,
751      'SELECTED' => $selected
752      ));
753}
754
755// +-----------------------------------------------------------------------+
756// |                            navigation bar                             |
757// +-----------------------------------------------------------------------+
758
759$url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
760
761$navbar = create_navigation_bar(
762  $url,
763  count($page['filtered_users']),
764  $start,
765  $conf['users_page']
766  );
767
768$template->assign_vars(array('NAVBAR' => $navbar));
769
770// +-----------------------------------------------------------------------+
771// |                               user list                               |
772// +-----------------------------------------------------------------------+
773
774$profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
775$perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
776
777$visible_user_list = array();
778foreach ($page['filtered_users'] as $num => $local_user)
779{
780  // simulate LIMIT $start, $conf['users_page']
781  if ($num < $start)
782  {
783    continue;
784  }
785  if ($num >= $start + $conf['users_page'])
786  {
787    break;
788  }
789
790  $visible_user_list[] = $local_user;
791}
792
793$visible_user_list = trigger_event('loc_visible_user_list', $visible_user_list);
794
795foreach ($visible_user_list as $num => $local_user)
796{
797  $groups_string = preg_replace(
798    '/(\d+)/e',
799    "\$groups['$1']",
800    implode(
801      ', ',
802      $local_user['groups']
803      )
804    );
805
806  if (isset($_POST['pref_submit'])
807      and isset($_POST['selection'])
808      and in_array($local_user['id'], $_POST['selection']))
809  {
810    $checked = 'checked="checked"';
811  }
812  else
813  {
814    $checked = '';
815  }
816
817  $template->assign_block_vars(
818    'user',
819    array(
820      'CLASS' => ($num % 2 == 1) ? 'row2' : 'row1',
821      'ID' => $local_user['id'],
822      'CHECKED' => $checked,
823      'U_PROFILE' => $profile_url.$local_user['id'],
824      'U_PERM' => $perm_url.$local_user['id'],
825      'USERNAME' => $local_user['username']
826        .($local_user['id'] == $conf['guest_id']
827          ? '<BR />['.l10n('is_the_guest').']' : '')
828        .($local_user['id'] == $conf['default_user_id']
829          ? '<BR />['.l10n('is_the_default').']' : ''),
830      'STATUS' => $lang['user_status_'.
831        $local_user['status']].(($local_user['adviser'] == 'true')
832        ? '<BR />['.l10n('adviser').']' : ''),
833      'EMAIL' => get_email_address_as_display_text($local_user['email']),
834      'GROUPS' => $groups_string,
835      'PROPERTIES' =>
836        (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
837        ? l10n('is_high_enabled') : l10n('is_high_disabled')
838      )
839    );
840  trigger_action('loc_assign_block_var_local_user_list', $local_user);
841}
842
843// +-----------------------------------------------------------------------+
844// |                           html code display                           |
845// +-----------------------------------------------------------------------+
846
847$template->assign_var_from_handle('ADMIN_CONTENT', 'user_list');
848?>
Note: See TracBrowser for help on using the repository browser.