def numberexists(number): #done users = GappUser.all() for user in users: if user.phonenumber == number: status = True else: status = False return status
def userexists(n_user): #done users = GappUser.all() for user in users: if (usernameexists(user.username) and numberexists(user.phone) and emailexists(user.email)): status = True else: status = False return status
def emailexists(email): users = GappUser.all() for user in users: if user.email: if user.email == email: status = True else: status = False return status
def usernameexists(username): #done #get the list of existing usernames # check if the username exists #if yes: #return yes #if no #return no users = GappUser.all() for user in users: if user.username == username: status = True else: status = False return status
def getusers(): return GappUser.all()
def addcontact(guser, new_friend): currentUser = GappUser.all().filter('key = ', guser.key().id_or_name())