N
N
Nathan Stark2015-07-09 09:24:52
1C-Bitrix
Nathan Stark, 2015-07-09 09:24:52

After adding a user, CUser::GetList doesn't load it?

There is some page, on top I display a list of users that I have registered, after (below) the new user registration form itself.
in the user field UF_MANYREG the list of id of users which I registered is stored.
Top part

<?
    $ThisUser = CUser::GetByID($USER->GetID());
    $serMANYREG = $ThisUser->Fetch()["UF_MANYREG"];
    $arrMANYREG = unserialize($serMANYREG);

    if($arrMANYREG) {
        foreach ($arrMANYREG as $artostr)
            $strMANYREG .= $artostr . "||";

        $rsUser = CUser::GetList(($by = "id"), ($order = "desc"), array("ID" => $strMANYREG), array());

        while ($arUser = $rsUser->Fetch())
            echo "<div>" . $arUser["LAST_NAME"] . " " . $arUser["NAME"] . " " . $arUser["SECOND_NAME"] . (($arUser["PERSONAL_CITY"]) ? ", <span>" . GetCountryByID($arUser["PERSONAL_COUNTRY"]).", ".$arUser["PERSONAL_CITY"] . "</span>" : "") . '<a href="/personal/collectivereg/edituser/?user=' . $arUser["ID"] . '" style="float: right;font-size: 12px;color: gainsboro;">Редактировать</a>' . "</div>";
    }
?>

from below I connect the registration component that I edited a little (removed the authorization check so that I could register a new user being authorized)
The whole problem is that after I register the user, the page is updated and this user is not displayed in the top list, only after page refresh. The cache is completely disabled.
I think there may be some other cache ..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-07-09
Madzhugin @Suntechnic

Naturally. At you at first there is a selection of users, and then registration. So at the moment when you get users, the one you are trying to register is not there yet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question