$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
            $xoopsMailer->setFromName($xoopsConfig['sitename']);
            $xoopsMailer->setSubject(_MD_XOONIPS_ACCOUNT_REJECTED);
            if (!$xoopsMailer->send()) {
                redirect_header('certifyuser.php', 3, sprintf(_US_ACTVMAILNG, $user['uname']));
            }
            redirect_header(XOOPS_URL . '/modules/xoonips/certifyuser.php', 3, _MD_XOONIPS_MODERATOR_UNCERTIFY_SUCCESS);
            exit;
        }
    }
}
$xoopsTpl->assign('op', $op);
$xoopsOption['template_main'] = 'xoonips_certifyuser.html';
$users = array();
$uids = array();
if (xnp_dump_uids($xnpsid, array(), $uids) != 0) {
    redirect_header(XOOPS_URL . '/', 3, _MD_XOONIPS_MODERATOR_ERROR_SELECT_USER);
    exit;
}
if (count($uids) > 0) {
    foreach ($uids as $i) {
        $user = array();
        if (xnp_get_account($xnpsid, $i, $user) == 0) {
            if (@$user['activate'] != 1 && @$user['level'] != 0) {
                // list acitvated & uncertified users only
                $users[] = array('uid' => $user['uid'], 'uname' => $textutil->html_special_chars($user['uname']), 'name' => $textutil->html_special_chars($user['name']), 'email' => $textutil->html_special_chars($user['email']));
            }
        }
    }
    $xoopsTpl->assign('users', $users);
    // token ticket
function xoonips_change_uid($su_uid)
{
    $u = new XoopsUser($su_uid);
    $groupids = $u->getGroups();
    $_SESSION['xoopsUserId'] = $su_uid;
    $_SESSION["xoopsUserGroups"] = $groupids;
}
if ($op == '') {
    if (isset($_SESSION['xoonips_old_uid'])) {
        redirect_header(XOOPS_URL . '/', 0, '');
        // already in su-mode
        exit;
    }
    $users = array();
    $uids = array();
    xnp_dump_uids($xnpsid, array(), $uids);
    xnp_get_accounts($xnpsid, $uids, array(), $users);
    // Sort by user account name
    foreach ($users as $key => $values) {
        $unameValues[$key] = $values['uname'];
    }
    $users_sort = $users;
    array_multisort($unameValues, SORT_ASC, $users_sort);
    $xoopsOption['template_main'] = 'xoonips_su.html';
    include XOOPS_ROOT_PATH . '/header.php';
    // Send variables to templete
    $xoopsTpl->assign('users', $users_sort);
    $xoopsTpl->assign('su_uid', $uids[0]);
    include XOOPS_ROOT_PATH . '/footer.php';
} else {
    if ($op == 'su') {