Ignore:
Timestamp:
Feb 4, 2014, 7:12:43 PM (10 years ago)
Author:
Eric
Message:

Piwigo 2.6 compatibility:
Users management (users display, password renewal and unlocking accounts) recoded in plugin's admin panel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Password_Policy/include/functions.inc.php

    r25104 r27179  
    198198  load_language('plugin.lang', PP_PATH);
    199199
    200   $template->append('plugin_user_list_column_titles', l10n('PP_PwdReset'));
    201 
    202200  $user_ids = array();
    203201
     
    600598
    601599/**
     600 * Function called from PP_admin.php - Get all users to display the number of days since their last visit
     601 *
     602 * @return : List of users
     603 *
     604 */
     605function pp_get_user_list()
     606{
     607  global $conf, $page;
     608
     609  $users = array();
     610
     611  // Search users with exclusion of Adult_Content generic users and guest user
     612  // -------------------------------------------------------------------------
     613  $query = '
     614SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
     615                u.'.$conf['user_fields']['username'].' AS username,
     616                u.'.$conf['user_fields']['email'].' AS email,
     617                ui.status
     618FROM '.USERS_TABLE.' AS u
     619  INNER JOIN '.USER_INFOS_TABLE.' AS ui
     620    ON u.'.$conf['user_fields']['id'].' = ui.user_id
     621WHERE u.username NOT LIKE "16"
     622  AND u.username NOT LIKE "18"
     623;';
     624
     625  $result = pwg_query($query);
     626     
     627  while ($row = pwg_db_fetch_assoc($result))
     628  {
     629    $user = $row;
     630    array_push($users, $user);
     631  }
     632
     633  $user_ids = array();
     634  foreach ($users as $i => $user)
     635  {
     636    $user_ids[$i] = $user['id'];
     637  }
     638
     639  return $users;
     640}
     641
     642
     643/**
    602644 * Function called from PP_admin.php to get the plugin version and name
    603645 *
Note: See TracChangeset for help on using the changeset viewer.