Is it possible to add a custom field to User model from a plugin?
First of all, you will need the Pro package to be able to customise the user profile.

Then you would have to use the onAfterInstall and onBeforeUninstall events in your plugin file. These events are called when installing and uninstalling the plugin.

After the install, you need to create a new field and add it to the user field layout. And before uninstall, you have to remove the field from the layout and delete the field itself.

The code below should work, but it doesn't keep the required fields (I didn't find a way to get them using the available functions).

&lt;?php

namespace Craft;

class UserfieldPlugin extends BasePlugin
{
    public function getName()
    {
        return Craft::t('Userfield');
    }

    public function getVersion()
    {
        return '0.9.1';
    }

    public function getDeveloper()
    {
        return 'Mario';
    }

    public function getDeveloperUrl()
    {
        return 'http://craftshake.com';
    }

    public function onAfterInstall()
    {
        // Create the third party field

        $thirdPartyField = new FieldModel();
        $thirdPartyField-&gt;groupId      = 1;
        $thirdPartyField-&gt;name         = Craft::t('Third Party');
        $thirdPartyField-&gt;handle       = 'thirdParty';
        $thirdPartyField-&gt;translatable = false;
        $thirdPartyField-&gt;type         = 'PlainText';

        craft()-&gt;fields-&gt;saveField($thirdPartyField);

        // Create the new user field layout

        $fieldLayout = craft()-&gt;fields-&gt;getLayoutByType(ElementType::User);
        $fieldsIds = $fieldLayout-&gt;getFieldIds();
        $fieldsIds[] = $thirdPartyField-&gt;id;

        craft()-&gt;fields-&gt;deleteLayoutsByType(ElementType::User);

        $fieldLayout = craft()-&gt;fields-&gt;assembleLayout(
            array(
                Craft::t('Profile') =&gt; $fieldsIds,
            ),
            array(),
            false
        );
        $fieldLayout-&gt;type = ElementType::User;

        craft()-&gt;fields-&gt;saveLayout($fieldLayout, false);
    }

    public function onBeforeUninstall()
    {
        // Get third party field
        $thirdPartyField = craft()-&gt;fields-&gt;getFieldByHandle('thirdParty');

        // Remove field from layout
        $fieldLayout = craft()-&gt;fields-&gt;getLayoutByType(ElementType::User);
        $fieldsIds = $fieldLayout-&gt;getFieldIds();
        $fieldsIds = array_diff($fieldsIds, array($thirdPartyField-&gt;id));

        craft()-&gt;fields-&gt;deleteLayoutsByType(ElementType::User);

        $fieldLayout = craft()-&gt;fields-&gt;assembleLayout(
            array(
                Craft::t('Profile') =&gt; $fieldsIds,
            ),
            array(),
            false
        );
        $fieldLayout-&gt;type = ElementType::User;

        craft()-&gt;fields-&gt;saveLayout($fieldLayout, false);

        // Delete field
        craft()-&gt;fields-&gt;deleteField($thirdPartyField);
    }

}


I hope this helps.

Mario