docs: def change_username(self, username):
          """
          Change user's login email
          :param user: AuthUser
          :param email:
          :return:
          """
  
          def cb():
  
              if self.login_method == "username" and "@" in username:
                  raise exceptions.AuthError(_("Username can't be an email"))
              elif self.login_method == "email" and "@" not in username:
                  raise exceptions.AuthError(_("Invalid email login"))
              if "@" in username:
                  if not utils.is_email_valid(username):
                      raise exceptions.AuthError("Email address invalid")
              elif not utils.is_username_valid(username):
                  raise exceptions.AuthError("Username invalid")
  
              # Change both email and
              if self.login_method == "email":
                  if not models.AuthUser.get_by_username(username) \
                          and not models.AuthUser.get_by_email(username):
                      self.user.change_username(username)
                      self.user.change_email(username)
              else:
                  self.user.change_username(username)
              return username
  
          return signals.user_update(self, ACTIONS["USERNAME"], cb)