'Returns the full name of the user, or if none is supplied will return
the username.
Also looks at ``USERENA_WITHOUT_USERNAMES`` settings to define if it
should return the username or email address when the full name is not
supplied.
:return:
``String`` containing the full name of the user. If no name is
supplied it will return the username or email address depending on
the ``USERENA_WITHOUT_USERNAMES`` setting.'

def get_full_name_or_username(self):

    user = self.user
    if (user.first_name or user.last_name):
        name = (_('%(first_name)s    %(last_name)s') % {'first_name': user.first_name, 'last_name': user.last_name})
    elif (not userena_settings.USERENA_WITHOUT_USERNAMES):
        name = ('%(username)s' % {'username': user.username})
    else:
        name = ('%(email)s' % {'email': user.email})
    return name.strip()
