Forget about the ips thingy, it was a mistake by me, but i still can't add groups to the userfile.. I'm using this code:
PHP Code:
<?php
$uid = io_user_create($_POST["username"]);
if ($uid >= 0)
{
$uhandle = io_user_open($uid);
io_user_lock($uhandle);
$userfile = explode("\n", io_user_print($uhandle));
$userfile[2] = "tagline " . $_POST["tagline"];
$userfile[4] = "password " . io_sha1($_POST["password"]);
$userfile[8] = "groups " . $_POST["group"]; // this one isn't working
$userfile[9] = "flags " . $_POST["flags"];
$userfile = implode("\n", $userfile);
io_user_save($uhandle, $userfile);
io_user_unlock($uhandle);
}
?>
Everything works, except for the $userfile[8] line..