public function renderProfile()
    {
        $this->checkIsLogin();

        $name = $this->di->get('session')->get("user");
        $user = $this->getUserDetails($name);


        $views = [
            ["comment/user/profile/profile", ["user" => $user], "main"]
        ];

        if ($user->authority == "admin") {
            $views = [
                ["comment/admin/navbar", [], "main"],
                ["comment/user/profile/profile", ["user" => $user], "main"]
            ];
        }

        $this->di->get("pageRenderComment")->renderPage([
            "views" =>  $views,
            "title" => "$user->name"
        ]);
    }
public function renderProfile()
    {
        $this->checkIsLogin();

        $name = $this->di->get('session')->get("user");
        $user = $this->getUserDetails($name);


        $views = [
            ["comment/user/profile/profile", ["user" => $user], "main"]
        ];

        if ($user->authority == "admin") {
            $views = [
                ["comment/admin/navbar", [], "main"],
                ["comment/user/profile/profile", ["user" => $user], "main"]
            ];
        }

        $this->di->get("pageRenderComment")->renderPage([
            "views" =>  $views,
            "title" => "$user->name"
        ]);
    }
public function renderProfile ( ) { $ this -> checkIsLogin ( ) ; $ name = $ this -> di -> get ( 'session' ) -> get ( "user" ) ; $ user = $ this -> getUserDetails ( $ name ) ; $ views = [ [ "comment/user/profile/profile" , [ "user" => $ user ] , "main" ] ] ; if ( $ user -> authority == "admin" ) { $ views = [ [ "comment/admin/navbar" , [ ] , "main" ] , [ "comment/user/profile/profile" , [ "user" => $ user ] , "main" ] ] ; } $ this -> di -> get ( "pageRenderComment" ) -> renderPage ( [ "views" => $ views , "title" => "$user->name" ] ) ; }
Render profile page

@return void
Render profile page