'Return the current user\'s root organisation name or None'

def root_org_name(self):

    if (not self.user):
        return None
    org_id = self.user.organisation_id
    if (not org_id):
        return None
    if (not current.deployment_settings.get_org_branches()):
        s3db = current.s3db
        table = s3db.org_organisation
        row = current.db((table.id == org_id)).select(table.name, cache=s3db.cache, limitby=(0, 1)).first()
        try:
            return row.name
        except:
            return None
    return current.cache.ram(('root_org_name_%s' % org_id), (lambda : current.s3db.org_root_organisation_name(org_id)), time_expire=120)
