public function showProfileFields($user)
    {
        // Get contents
        $fields = $this->fields;
        $title = $this->title;

        // Check fields
        if (empty($fields)) {
            return;
        }

        $vars = [
            't_user_title' => !empty($title) ? $title : Translate::t('user.title'),
        ];

        // Get all values
        foreach ($fields as $field) {
            if (!$field) {
                continue;
            }

            $vars['fields'][] = $field->render([], [
                'template' => 'user',
                'user' => $user,
            ], false);
        }

        // Render view
        Render::view('user.html.twig', $vars, 'user');
    }
public function showProfileFields($user)
    {
        // Get contents
        $fields = $this->fields;
        $title = $this->title;

        // Check fields
        if (empty($fields)) {
            return;
        }

        $vars = [
            't_user_title' => !empty($title) ? $title : Translate::t('user.title'),
        ];

        // Get all values
        foreach ($fields as $field) {
            if (!$field) {
                continue;
            }

            $vars['fields'][] = $field->render([], [
                'template' => 'user',
                'user' => $user,
            ], false);
        }

        // Render view
        Render::view('user.html.twig', $vars, 'user');
    }
public function showProfileFields ( $ user ) { // Get contents $ fields = $ this -> fields ; $ title = $ this -> title ; // Check fields if ( empty ( $ fields ) ) { return ; } $ vars = [ 't_user_title' => ! empty ( $ title ) ? $ title : Translate :: t ( 'user.title' ) , ] ; // Get all values foreach ( $ fields as $ field ) { if ( ! $ field ) { continue ; } $ vars [ 'fields' ] [ ] = $ field -> render ( [ ] , [ 'template' => 'user' , 'user' => $ user , ] , false ) ; } // Render view Render :: view ( 'user.html.twig' , $ vars , 'user' ) ; }
Hook to display user custom fields.

@param object $user
Hook to display user custom fields .