#NEWLINE# def change_email( self , email ) : #NEWLINE# #INDENT# '\n        Changes the email address for a user.\n\n        A user needs to verify this new email address before it becomes\n        active. By storing the new email address in a temporary field --\n        ``temporary_email`` -- we are able to set this email address after the\n        user has verified it by clicking on the verification URI in the email.\n        This email gets send out by ``send_verification_email``.\n\n        :param email:\n            The new email address that the user wants to use.\n\n        ' #NEWLINE# self . email_unconfirmed = email #NEWLINE# ( salt , hash ) = generate_sha1 ( self . user . username ) #NEWLINE# self . email_confirmation_key = hash #NEWLINE# self . email_confirmation_key_created = get_datetime_now ( ) #NEWLINE# self . save ( ) #NEWLINE# self . send_confirmation_email ( )