invenio_migrator/legacy/users.py
def dump(u, *args, **kwargs):
    """Dump the users as a list of dictionaries.

    :param u: User to be dumped.
    :type u: `invenio.modules.accounts.models.User [Invenio2.x]` or namedtuple.
    :returns: User serialized to dictionary.
    :rtype: dict
    """
    return dict(
        id=u.id,
        email=u.email,
        password=u.password,
        password_salt=u.password_salt,
        note=u.note,
        full_name=u.full_name if hasattr(u, 'full_name') else '{0} {1}'.format(
            u.given_names, u.family_name),
        settings=u.settings,
        nickname=u.nickname,
        last_login=dt2iso_or_empty(u.last_login))
def dump(u, *args, **kwargs):
    return dict(
        id=u.id,
        email=u.email,
        password=u.password,
        password_salt=u.password_salt,
        note=u.note,
        full_name=u.full_name if hasattr(u, 'full_name') else '{0} {1}'.format(
            u.given_names, u.family_name),
        settings=u.settings,
        nickname=u.nickname,
        last_login=dt2iso_or_empty(u.last_login))
def dump ( u , * args , * * kwargs ) : return dict ( id = u . id , email = u . email , password = u . password , password_salt = u . password_salt , note = u . note , full_name = u . full_name if hasattr ( u , 'full_name' ) else '{0} {1}' . format ( u . given_names , u . family_name ) , settings = u . settings , nickname = u . nickname , last_login = dt2iso_or_empty ( u . last_login ) )
Dump the users as a list of dictionaries.

    :param u: User to be dumped.
    :type u: `invenio.modules.accounts.models.User [Invenio2.x]` or namedtuple.
    :returns: User serialized to dictionary.
    :rtype: dict
Dump the users as a list of dictionaries .