예제 #1
0
def credentials_valid_and_user_registered(email, password):
    """
    Only returns true if the email exists in the datastore,
    and the password is correct.
    """
    #TODO(rushiagr): put all the server-side validation code here
    
    user = UserInfo.get_by_id(email)
    if user is not None and user.password == password:
        return True
    return False
예제 #2
0
def email_already_in_db(email):
    user = UserInfo.get_by_id(email)
    if user is not None:
        return True
    return False
예제 #3
0
파일: util.py 프로젝트: russomi/gaeicious
def mys_on(user):
    ui = UserInfo.get_by_id(str(user.user_id()))
    if ui.mys == False:
        ui.mys = True
        ui.put()
예제 #4
0
파일: util.py 프로젝트: russomi/gaeicious
def mys_off(user):
    ui = UserInfo.get_by_id(str(user.user_id()))
    if ui.mys == True:
        ui.mys = False
        ui.put()
        return 'was_true'