#NEWLINE# def populate_user( self , user ) : #NEWLINE# #INDENT# user . first_name = self . first_name . data #NEWLINE# user . last_name = self . last_name . data #NEWLINE# if self . phone_number . data : #NEWLINE# #INDENT# import re #NEWLINE# from breezeminder.models.user import PhoneNumber #NEWLINE# from breezeminder.models.wireless import WirelessCarrier #NEWLINE# from breezeminder.util.shortcodes import shortcode #NEWLINE# try : #NEWLINE# #INDENT# old_number = getattr ( user . cell_phone , 'number' , '' ) #NEWLINE# user . cell_phone = PhoneNumber ( type = self . phone_type . data , carrier = WirelessCarrier . objects . get ( pk_hash = self . phone_carrier . data ) , number = re . sub ( '[^0-9]' , '' , self . phone_number . data ) ) #NEWLINE# if ( ( user . cell_phone . number != old_number ) or ( not user . cell_verified ) ) : #NEWLINE# #INDENT# user . cell_verified = False #NEWLINE# user . cell_verify_code = shortcode ( user . cell_phone . number ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# app . logger . exception ( 'Saving user wireless number failed' )