private function refresh(): bool
    {
        //check for login data on in current session
        if (empty($this->session->login)) {
            return false;
        }

        //take time
        $time = \time();

        //check if login expired
        if (($this->session->loginTime + $this->session->expire) < $time) {
            return false;
        }

        //update login data
        $this->session->loginTime = $time;
        $this->data = $this->session->login;

        return true;
    }
private function refresh(): bool
    {
        //check for login data on in current session
        if (empty($this->session->login)) {
            return false;
        }

        //take time
        $time = \time();

        //check if login expired
        if (($this->session->loginTime + $this->session->expire) < $time) {
            return false;
        }

        //update login data
        $this->session->loginTime = $time;
        $this->data = $this->session->login;

        return true;
    }
private function refresh ( ) : bool { //check for login data on in current session if ( empty ( $ this -> session -> login ) ) { return false ; } //take time $ time = \ time ( ) ; //check if login expired if ( ( $ this -> session -> loginTime + $ this -> session -> expire ) < $ time ) { return false ; } //update login data $ this -> session -> loginTime = $ time ; $ this -> data = $ this -> session -> login ; return true ; }
Check if user is logged, get login data from session and update it.

@return bool True if refresh is done false if no.
Check if user is logged get login data from session and update it .