commandline adduser tool (to solve all that default username malarky!)

git-svn-id: http://www.observium.org/svn/observer/trunk@185 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong 2008-03-22 14:13:16 +00:00
parent a982a5027f
commit 5a8ea32cbb

15
adduser.php Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/php
<?php
include("config.php");
include("includes/functions.php");
if($argv[1] && $argv[2] && $argv[3]) {
mysql_query("INSERT INTO `users` (`username`,`password`,`level`) VALUES ('".$argv[1]."',MD5('".$argv[2]."'),'".$argv[3]."')");
} else {
echo("Add User Tool\nUsage: ./adduser.php <username> <password> <level 0-10>\n");
}
?>