Example #1
0
        $login_method = $login_method == 'ldap' ? 'ldap' : 'pass';
        $last_pass_change = $user->last_pass_change();
        $is_admin = $user->get_is_admin();
        $first_login = 0;
        $sel_assets = $user->get_assets();
        $sel_sensors = $user->get_sensors();
        if ($pro) {
            if (is_array($user->get_ctx())) {
                $entities = array_flip($user->get_ctx());
            }
        } else {
            $company = $user->get_company();
            $department = $user->get_department();
            //Allowed Menus
            if ($template_id != '') {
                $template = Session::get_template_by_id($conn, $template_id);
            }
        }
        //If we don't do this, in user-edit.php it thinks that we are editing instead of creating a new user.
        if (!$duplicate) {
            $_SESSION['user_in_db'] = $login;
        }
    } else {
        if ($_GET['load_cookies'] != '1') {
            echo ossim_error(_('Permission error - You can not edit this user'), AV_ERROR, 'margin: 40px auto; width: 80%; text-align:left;');
            exit;
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">