Wii.. all user_ commands were added (I was kind enough to add error definitions

php api, is quite nice for adding new commands)
io_user_open command looks following:
Code:
/* proto object io_user_open(uid)
Open user */
PHP_FUNCTION(io_user_open)
{
LONG Uid;
LPPHP_USERFILE lpUserFile;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
"l", &Uid) == FAILURE) return;
if (Uid < 0 || Uid >= MAX_UID)
{
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid UID");
RETURN_FALSE;
}
lpUserFile = (LPPHP_USERFILE)Allocate("PHP:UserFile", sizeof(USERFILE));
if (! lpUserFile) RETURN_FALSE
ZeroMemory(lpUserFile, sizeof(PHP_USERFILE));
if (UserFile_OpenPrimitive(Uid, &lpUserFile->lpUserFile, 0))
{
Php_SetError(GetLastError(), TSRMLS_CC);
Free(lpUserFile);
RETURN_FALSE;
}
ZEND_REGISTER_RESOURCE(return_value, lpUserFile, iUserFile);
}