def reclaim_personid_for_new_arXiv_user(bibrecs, name, uid= -1):
    pidlist = get_personids_and_papers_from_bibrecs(bibrecs, limit_by_name=name)
    for p in pidlist:
        if not get_uid_from_personid(p[0]):
            dbinter.set_personid_row(p[0], 'uid', uid)
            return p[0]
    return create_new_person(uid, uid_is_owner=True)
def check_personids_availability(picked_profile, uid):

    if picked_profile == -1:
        return create_new_person(uid, uid_is_owner=True)
    else:
        if not get_uid_from_personid(picked_profile):
            dbinter.set_personid_row(picked_profile, 'uid', uid)
            return picked_profile
        else:
            return create_new_person(uid, uid_is_owner=True)
Example #3
0
def check_personids_availability(picked_profile, uid):

    if picked_profile == -1:
        return create_new_person(uid, uid_is_owner=True)
    else:
        if not get_uid_from_personid(picked_profile):
            dbinter.set_personid_row(picked_profile, 'uid', uid)
            return picked_profile
        else:
            return create_new_person(uid, uid_is_owner=True)
def set_person_data(person_id, tag, value, user_level=None):
    '''
    @param person_id:
    @type person_id: int
    @param tag:
    @type tag: string
    @param value:
    @type value: string
    @param user_level:
    @type user_level: int
    '''
    old = dbinter.get_personid_row(person_id, tag)
    old_data = [tup[0] for tup in old]
    if value not in old_data:
        dbinter.set_personid_row(person_id, tag, value, opt2=user_level)
def set_person_data(person_id, tag, value, user_level=0):
    old = dbinter.get_personid_row(person_id, tag)
    if old[0] != value:
        dbinter.set_personid_row(person_id, tag, value, opt2=user_level)
Example #6
0
def set_person_data(person_id, tag, value, user_level=0):
    old = dbinter.get_personid_row(person_id, tag)
    if old[0] != value:
        dbinter.set_personid_row(person_id, tag, value, opt2=user_level)