Add a new maintenance script to reset the user_token of all users if you think someon...
[lhc/web/wiklou.git] / maintenance / ourusers.php
index a7a3132..c8578e2 100644 (file)
@@ -6,9 +6,25 @@
  * list of hosts. It takes care of setting the wikiuser for every
  * database as well as setting up wikiadmin.
  *
+ * This program 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 program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
  * @todo document
  * @file
  * @ingroup Maintenance
+ * @ingroup Wikimedia
  */
 
 /** */
@@ -31,12 +47,12 @@ $databases = array(
 print "/*!40100 set old_passwords=1 */;\n";
 print "/*!40100 set global old_passwords=1 */;\n";
 
-foreach( $hosts as $host ) {
+foreach ( $hosts as $host ) {
        print "--\n-- $host\n--\n";
        print "\n-- wikiuser\n\n";
        print "GRANT REPLICATION CLIENT,PROCESS ON *.* TO 'wikiuser'@'$host' IDENTIFIED BY '$wikiuser_pass';\n";
        print "GRANT ALL PRIVILEGES ON `boardvote%`.* TO 'wikiuser'@'$host' IDENTIFIED BY '$wikiuser_pass';\n";
-       foreach( $databases as $db ) {
+       foreach ( $databases as $db ) {
                print "GRANT SELECT, INSERT, UPDATE, DELETE ON `$db`.* TO 'wikiuser'@'$host' IDENTIFIED BY '$wikiuser_pass';\n";
        }