Пример #1
0
 def create_mobile_worker(self, username, password, phone_number, save_vn=True):
     processed_username = process_username(username, self.domain)
     user = CommCareUser.create(self.domain, processed_username, password,
         phone_number=phone_number)
     if save_vn:
         entry = user.get_or_create_phone_entry(phone_number)
         entry.set_two_way()
         entry.set_verified()
         entry.save()
     self.users.append(user)
     return user
Пример #2
0
 def create_mobile_worker(self, username, password, phone_number, save_vn=True):
     processed_username = process_username(username, self.domain)
     user = CommCareUser.create(self.domain, processed_username, password,
         phone_number=phone_number)
     if save_vn:
         entry = user.get_or_create_phone_entry(phone_number)
         entry.set_two_way()
         entry.set_verified()
         entry.save()
     self.users.append(user)
     return user