public function my()
    {
        $profile = $this->Profiles->find()
            ->where([
                'Profiles.user_id' => $this->Auth->user('id')
            ])->contain('Users')->first();

        $this->set('profile', $profile);
        $this->set('_serialize', ['profile']);
    }
public function my()
    {
        $profile = $this->Profiles->find()
            ->where([
                'Profiles.user_id' => $this->Auth->user('id')
            ])->contain('Users')->first();

        $this->set('profile', $profile);
        $this->set('_serialize', ['profile']);
    }
public function my ( ) { $ profile = $ this -> Profiles -> find ( ) -> where ( [ 'Profiles.user_id' => $ this -> Auth -> user ( 'id' ) ] ) -> contain ( 'Users' ) -> first ( ) ; $ this -> set ( 'profile' , $ profile ) ; $ this -> set ( '_serialize' , [ 'profile' ] ) ; }
Shows current user profile
Shows current user profile