• create a portal user manager

    Returns "portaluser".Manager

    Example

    import * as portaluser from 'portaluser';

    let mng = portaluser.newManager();
    let pu = mng.getByUsername("pu1");
    let pus = mng.getByUsernames(["pu1", "pu2"]);
    // console.log(pu);
    console.log(pu.id);
    console.log(pu.username);
    for(let i in pu.profiles) {
    console.log(pu.profiles[i].id);
    console.log(pu.profiles[i].name);
    }
    console.log(pu.timezone);

    let pu1 = mng.getById("10gg000000QW0pp5EnWy");
    console.log(pu1);

    // let pus = mng.getList(0, 10);
    // for (let i in pus) {
    // console.log(pus[i]);
    // }

    mng.setTimezoneById("10gg000000QW0pp5EnWy", "10");

    try {
    mng.addProfilesById("10gg000000QW0pp5EnWy", ["000T000000R1ErfLemCe"]);
    } catch (e) {
    console.log("error", e.message);
    }

    // console.log(mng.getById("10gg000000QW0pp5EnWy"));


    // mng.setProfilesById("10gg000000QW0pp5EnWy", ["1"])

    // console.log(mng.getById("10gg000000QW0pp5EnWy"));