manuel-serrano / hop

Multitier JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change the password of an existing user

svenha opened this issue · comments

Is there an easy way to change the password of an existing hop user inside a running hop server? I am looking for something like change-user! or update-user! (corresponding to add-user!).

Hi Sven,

No such thing exists, mostly because we did know how to make something
similar with decent secure guaranties and we wanted to avoid by
security mistakes in the first place. However, you have probably
noticed that add-user! is a kind of special function as it is only
callable before the web server is started. I think it should be
conceivable to provide the functions you are proposing with the same
restriction. Would that make sense to you?

I know that the call to users-close! must be delayed until all users are set up (with add-user! or similar). A new function that allows changing the pw (and underlying the same users-close! constraint) would be perfect.

I was able to implement the wanted functionality via a call to add-user! for the existing user name. I had to make sure that hop's user registration is open at that moment.