cvs: php-master-web /entry cvs-account.php /manage users.php
| From: | jim winstead | Date: | Thu, 06 Dec 2001 20:22:38 +0000 |
| Subject: | cvs: php-master-web /entry cvs-account.php /manage users.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-7701@lists.php.net to get a copy of this message | ||
jimw Thu Dec 6 15:22:38 2001 EDT
Modified files:
/php-master-web/entry cvs-account.php
/php-master-web/manage users.php
Log:
send email on removal, add links to reject requests to mail sent to group@php.net, and always
match usersnames on searches, since short ones aren't indexed in the fulltext index
Index: php-master-web/entry/cvs-account.php
diff -u php-master-web/entry/cvs-account.php:1.2 php-master-web/entry/cvs-account.php:1.3
--- php-master-web/entry/cvs-account.php:1.2 Thu Nov 15 21:09:49 2001
+++ php-master-web/entry/cvs-account.php Thu Dec 6 15:22:38 2001
@@ -44,6 +44,7 @@
$msg .= "\n-- \n";
$msg .= "approve: http://master.php.net/manage/users.php?action=approve&id=$new_id\n";
+ $msg .= "reject: http://master.php.net/manage/users.php?action=remove&id=$new_id\n";
mail($failto,"CVS Account Request: $username",$msg,"From: $from\r\nMessage-ID:
<cvs-account-$new_id-admin@php.net>");
} else {
Index: php-master-web/manage/users.php
diff -u php-master-web/manage/users.php:1.17 php-master-web/manage/users.php:1.18
--- php-master-web/manage/users.php:1.17 Wed Dec 5 17:54:10 2001
+++ php-master-web/manage/users.php Thu Dec 6 15:22:38 2001
@@ -54,19 +54,38 @@
echo '<script
language="javascript">window.close();</script>';
exit;
}
+ warn("record $id ($userinfo[username]) approved");
}
else {
warn("wasn't able to grant cvs access to id $id.");
}
break;
case 'remove':
+ $userinfo = fetch_user($id);
if (mysql_query("DELETE FROM users WHERE userid=$id")
&& mysql_affected_rows()) {
+ $message = $userinfo[cvsaccess] ?
+"Your CVS account ($userinfo[username]) was deleted.
+
+Feel free to send us a note at group@php.net to find out why this
+was done."
+:
+"Your CVS account request ($userinfo[username]) was denied.
+
+The most likely reason is that you did not read the reasons for
+which CVS accounts are granted, and your request failed to meet
+the list of acceptable criteria.
+
+If you'd like to make another appeal for a CVS account, feel free
+to send us a note at group@php.net.";
+ mail($userinfo[email],"CVS Account Request:
$userinfo[username]",$message,"From: PHP Group <group@php.net>");
+ mail($mailto,$userinfo[cvsaccess] ? "CVS Account Deleted: $userinfo[username] deleted by
$user" : "CVS Account Rejected: $userinfo[username] rejected by
$user","","From: PHP Group <group@php.net>");
mysql_query("DELETE FROM users_note WHERE userid=$id");
if (!$noclose) {
echo '<script
language="javascript">window.close();</script>';
exit;
}
+ warn("record $id ($userinfo[username]) removed");
}
else {
warn("wasn't able to delete id $id.");
@@ -206,7 +225,7 @@
$limit = "LIMIT $begin,$max";
$orderby = $order ? "ORDER BY $order" : "";
-$searchby = $search ? "WHERE (MATCH(name,email,username) AGAINST ('$search') OR
MATCH(note) AGAINST ('$search'))" : "";
+$searchby = $search ? "WHERE (MATCH(name,email,username) AGAINST ('$search') OR
MATCH(note) AGAINST ('$search') OR username = '$search')" : "";
if (!$searchby && $unapproved) {
$searchby = 'WHERE (username IS NOT NULL AND NOT cvsaccess)';
}
@@ -253,7 +272,7 @@
<td align="center"><a href="<?php echo
"$PHP_SELF?id=$row[userid]";?>">edit</a></td>
<td><?php echo htmlspecialchars($row[name]);?></td>
<td><?php echo htmlspecialchars($row[email]);?></td>
- <td<?php if ($row[username] && !$row[cvsaccess]) echo '
bgcolor="#ff',substr($color,2),'"';?>><?php echo
htmlspecialchars($row[username]);?><?php if ($row[username] && !$row[cvsaccess]) echo
" <a href=\"$PHP_SELF?action=approve&noclose=1&id=$row[userid]\"
title=\"approve\">+</a>";?></td>
+ <td<?php if ($row[username] && !$row[cvsaccess]) echo '
bgcolor="#ff',substr($color,2),'"';?>><?php echo
htmlspecialchars($row[username]);?><?php if ($row[username] && is_admin($user)) { if
(!$row[cvsaccess]) echo " <a
href=\"$PHP_SELF?action=approve&noclose=1&id=$row[userid]\"
title=\"approve\">+</a>"; echo " <a
href=\"$PHP_SELF?action=remove&noclose=1&id=$row[userid]\"
title=\"remove\">×</a>"; }?></td>
</tr>
<?php
if ($full && $row[note]) {?>