You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
545 B

14 years ago
<?php
/*
*
* @copyright (c) 2010 animegame.eu
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public Licence
*
*/
function insertUser($user_name, $password){
$sql = 'SELECT * FROM user WHERE nickname like \''.$user_name.'\'';
$user = mysqli_fetch_assoc(db_query($sql));
14 years ago
// Insert User into mumble!
$sql = 'Insert into '.$GLOBALS['mumble_db_name'].'.players(server_id, player_id, name, pw) values(1, '.$user['id'].', \''.$user['nickname'].'\', sha(\''.$password.'\'))';
// Should do the trick!
db_query($sql);
14 years ago
}
?>