def rename_user(self, username, newname):
		if self._root.censor and not self._root.SayHooks._nasty_word_censor(newname):
			return False, 'New username failed to pass profanity filter.'
		user = self.clientFromUsername(username)
		if user:
			name = newname.lower()
			old = username.lower()
			if name != old and name in self.accounts:
				return False, 'Username already exists.'
			else:
				user.lowername = name
				user.username = newname
				self.accounts[name] = user
				if name != old:
					del self.accounts[old]
				return True, 'Account renamed successfully.'
dataset/ETHPy150Open lunixbochs/uberserver/tasserver/LegacyUsers.py/UsersHandler.rename_user/original