'Changes the email address for a user.
A user needs to verify this new email address before it becomes
active. By storing the new email address in a temporary field --
``temporary_email`` -- we are able to set this email address after the
user has verified it by clicking on the verification URI in the email.
This email gets send out by ``send_verification_email``.
:param email:
The new email address that the user wants to use.'

def change_email(self, email):

    self.email_unconfirmed = email
    (salt, hash) = generate_sha1(self.user.username)
    self.email_confirmation_key = hash
    self.email_confirmation_key_created = get_datetime_now()
    self.save()
    self.send_confirmation_email()
