Quote:
Originally Posted by Lordy
When using your code (amatulic), I get "Fatal error: Call to a member function query_first() on a non-object in /home/lordy/domains/animefill.com/public_html/project/forum/includes/class_dm_user.php on line 380"
|
Odd. It's working for me. Try this hard-coded example, in the same directory where you have class.forumops.php. You can run it from the commandline:
PHP Code:
<?php
require_once('class.forumops.php');
$userdata = array(
'userid' => 'test_user',
'password' => 'my_password',
'email' => 'test_user@example.com' );
$forum = new ForumOps();
$errmsg = $forum->register_newuser($userdata);
if ($errmsg) echo $errmsg;
else echo "User test_user created successfully.<br>\n";
?>
You can go to the admin control panel "Prune / Move Users" and verify the user account 'test_user' got created. I just did a diff of what I posted vs what I have, and the only difference I see is that I am now passing the username by reference to delete_user(). That shouldn't make any difference. I'll update my source in my previous message anyway.
-Alex