Hi. This code should be functional but I can't seem to figure out why this won't work. Thank you in advance.

<?php
    function e($f){
        echo ($f);
        printf("\r");
    }

    e("setup");
    $user->setup();

    /* globale variablen setzen */
    global $phpbb_root_path;
    global $phpEx;
    global $db;
    global $config;
    global $user;
    global $auth;
    global $cache;
    global $template;

    /* Datei inkludieren die die benoetigten Funktionen beinhaltet */
    require('includes/functions_user.php');

    /* Daten in array schreiben */
    e(",    creating array")    
    $user_row = array(
    'username' => 'test',
    'user_password' => md5('test'),
    'user_email' => 'test@example.com',
    'group_id' => '2',
    'user_timezone' => '1.00',
    'user_dst' => '0',
    'user_lang' => 'de',
    'user_type' => '0',
    'user_actkey' => '',
    'user_dateformat' => 'd M Y H:i',
    'user_style' => '1',
    'user_regdate' => time(),
    );

    e(",    adding");

    /* User anlegen */
    $phpbb_user_id = user_add($user_row)
?>
Member Avatar for diafol

There could be a million things wrong with it, but as it's part of a bigger animal - references to user-defined functions that you do not include - difficult to say. Before you dump any more code - is it yours? Alternatively, try the phpBB forum.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.