View Single Post
Old 05-09-2004, 06:55 AM  
St0rm
Disabled
 
Join Date: Nov 2003
Posts: 105
Default

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..
St0rm is offline   Reply With Quote