About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
community:pmc_meetings:minutes20240521

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
community:pmc_meetings:minutes20240521 [2024/04/16 18:29] – [6. Wiki Account Management] demiankatzcommunity:pmc_meetings:minutes20240521 [2024/04/16 18:42] (current) – [6. Wiki Account Management] demiankatz
Line 58: Line 58:
  
 ...and then using Excel to extract and deduplicate the appropriate column of the resulting file. ...and then using Excel to extract and deduplicate the appropriate column of the resulting file.
 +
 +He then saved the list to a file called known.txt, and ran this script to filter the user file:
 +
 +<code php>
 +<?php
 +
 +$known = array_filter(array_map('trim', file(__DIR__ . '/known.txt')));
 +
 +$users = fopen('/path/to/dokuwiki/conf/users.auth.php', 'r');
 +
 +$good = fopen(__DIR__ . '/good.php', 'w');
 +$bad = fopen(__DIR__ . '/bad.php', 'w');
 +
 +while ($line = fgets($users)) {
 +    $username = current(explode(':', $line));
 +    $out = in_array($username, $known) ? $good : $bad;
 +    fputs($out, $line);
 +}
 +
 +fclose($users);
 +fclose($good);
 +fclose($bad);
 +</code>
 ===== 7. Possible Future Actions ===== ===== 7. Possible Future Actions =====
  
community/pmc_meetings/minutes20240521.txt · Last modified: 2024/04/16 18:42 by demiankatz