Do not trigger the "setNewPassword" hook twice (see #5247)