Beispiel #1
0
def numberexists(number): #done
  users = GappUser.all()
  for user in users:
    if user.phonenumber == number:
      status = True
    else:
     status = False
    return status
Beispiel #2
0
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 
Beispiel #3
0
def emailexists(email):
  users = GappUser.all()
  for user in users:
    if user.email:
      if user.email == email:
        status = True
      else:
        status = False
  return status
Beispiel #4
0
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
Beispiel #5
0
def getusers():
  return GappUser.all()
Beispiel #6
0
def addcontact(guser, new_friend):
  currentUser  = GappUser.all().filter('key = ', guser.key().id_or_name())