concrete/src/User/PostLoginLocation.php
public function setSessionPostLoginUrl($url)
    {
        $normalized = null;
        if ($url instanceof Page) {
            if (!$url->isError()) {
                $cID = (int) $url->getCollectionID();
                if ($cID > 0) {
                    $normalized = $cID;
                }
            }
        } elseif ($this->valn->integer($url, 1)) {
            $normalized = (int) $url;
        } else {
            $url = (string) $url;
            if (strpos($url, '/') !== false) {
                $normalized = $url;
            }
        }
        $this->resetSessionPostLoginUrl();
        if ($normalized !== null) {
            $this->session->set(static::POSTLOGIN_SESSION_KEY, $normalized);
        }
    }
public function setSessionPostLoginUrl($url)
    {
        $normalized = null;
        if ($url instanceof Page) {
            if (!$url->isError()) {
                $cID = (int) $url->getCollectionID();
                if ($cID > 0) {
                    $normalized = $cID;
                }
            }
        } elseif ($this->valn->integer($url, 1)) {
            $normalized = (int) $url;
        } else {
            $url = (string) $url;
            if (strpos($url, '/') !== false) {
                $normalized = $url;
            }
        }
        $this->resetSessionPostLoginUrl();
        if ($normalized !== null) {
            $this->session->set(static::POSTLOGIN_SESSION_KEY, $normalized);
        }
    }
public function setSessionPostLoginUrl ( $ url ) { $ normalized = null ; if ( $ url instanceof Page ) { if ( ! $ url -> isError ( ) ) { $ cID = ( int ) $ url -> getCollectionID ( ) ; if ( $ cID > 0 ) { $ normalized = $ cID ; } } } elseif ( $ this -> valn -> integer ( $ url , 1 ) ) { $ normalized = ( int ) $ url ; } else { $ url = ( string ) $ url ; if ( strpos ( $ url , '/' ) !== false ) { $ normalized = $ url ; } } $ this -> resetSessionPostLoginUrl ( ) ; if ( $ normalized !== null ) { $ this -> session -> set ( static :: POSTLOGIN_SESSION_KEY , $ normalized ) ; } }
Store in the session the post-login URL or page.

@param string|\League\URL\URLInterface|\Concrete\Core\Page\Page|int $url the URL to redirect users to after login
Store in the session the post - login URL or page .