def form_field_definitions(self):
        """Hook optional_login extractor if necessary for form defaults.
        """
        schema = copy.deepcopy(form_field_definitions.user)
        uid, login = self._get_auth_attrs()
        if uid != login:
            field = schema.get(login, schema['default'])
            if field['chain'].find('*optional_login') == -1:
                field['chain'] = '%s:%s' % (
                    '*optional_login', field['chain'])
                if not field.get('custom'):
                    field['custom'] = dict()
                field['custom']['optional_login'] = \
                    (['context.optional_login'], [], [], [], [])
            schema[login] = field
        return schema
Hook optional_login extractor if necessary for form defaults.