cvs: php-master-web /manage users.php
| From: | Hannes Magnusson | Date: | Tue, 16 Dec 2008 09:15:06 +0000 |
| Subject: | cvs: php-master-web /manage users.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-3331@lists.php.net to get a copy of this message | ||
bjori Tue Dec 16 09:15:06 2008 UTC
Modified files:
/php-master-web/manage users.php
Log:
When creating users/updating password store the svn pass too
# NOTE: *all* existing users will have to "change" their passwords
# before they will be able to use svn
http://cvs.php.net/viewvc.cgi/php-master-web/manage/users.php?r1=1.49&r2=1.50&diff_format=u
Index: php-master-web/manage/users.php
diff -u php-master-web/manage/users.php:1.49 php-master-web/manage/users.php:1.50
--- php-master-web/manage/users.php:1.49 Sat Aug 23 09:57:31 2008
+++ php-master-web/manage/users.php Tue Dec 16 09:15:06 2008
@@ -1,4 +1,4 @@
-<?php
+<?php // vim: et ts=2 sw=2
#TODO:
# acls
@@ -7,6 +7,7 @@
require_once 'login.inc';
require_once 'functions.inc';
require_once 'email-validation.inc';
+require_once dirname(__FILE__) . "/../include/svn-auth.inc";
$mailto = "group@php.net";
@@ -124,7 +125,9 @@
else {
if ($in[rawpasswd]) {
$in[passwd] = crypt($in[rawpasswd],substr(md5(time()),0,2));
+ $in[svnpasswd] = gen_svn_pass($in["username"], $in["rawpasswd"]);
}
+
$cvsaccess = $in[cvsaccess] ? 1 : 0;
$enable = $in[enable] ? 1 : 0;
$spamprotect = $in[spamprotect] ? 1 : 0;
@@ -137,6 +140,7 @@
if (isset($in[email]) && isset($in[name])) {
$query = "UPDATE users SET
name='$in[name]',email='$in[email]'"
. ($in[passwd] ? ",passwd='$in[passwd]'" : "")
+ . ($in[svnpasswd] ? ",svnpasswd='$in[svnpasswd]'" :
"")
. ((is_admin($user) && $in[username]) ?
",username='$in[username]'" : "")
. (is_admin($user) ? ",cvsaccess=$cvsaccess" : "")
. ",spamprotect=$spamprotect"
@@ -160,6 +164,7 @@
$query = "INSERT users SET
name='$in[name]',email='$in[email]'"
. ($in[username] ? ",username='$in[username]'" : "")
. ($in[passwd] ? ",passwd='$in[passwd]'" : "")
+ . ($in[svnpasswd] ? ",svnpasswd='$in[svnpasswd]'" :
"")
. (is_admin($user) ? ",cvsaccess=$cvsaccess" : "")
. ",spamprotect=$spamprotect"
. ",use_sa=$use_sa"