MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / changeUserPassword

Method changeUserPassword

src/astroprint/users.py:245–254  ·  view source on GitHub ↗
(self, username, password)

Source from the content-addressed store, hash-verified

243 eventManager().fire(Events.PIN_STATUS, True)
244
245 def changeUserPassword(self, username, password):
246 if not username in self._users.keys():
247 raise UnknownUser(username)
248
249 passwordHash = UserManager.createPasswordHash(password)
250 user = self._users[username]
251 if user._passwordHash != passwordHash:
252 user._passwordHash = passwordHash
253 self._dirty = True
254 self._save()
255
256 def generateApiKey(self, username):
257 if not username in self._users.keys():

Callers

nothing calls this directly

Calls 3

_saveMethod · 0.95
UnknownUserClass · 0.85
createPasswordHashMethod · 0.80

Tested by

no test coverage detected