fixed: messages about password validity in adduser function were not shown,

slog and locale for functions->fun_passwd were not set
This commit is contained in:
2021-01-25 18:41:28 +01:00
parent 499db7e3eb
commit 4625451c85
2 changed files with 8 additions and 5 deletions

View File

@@ -264,6 +264,11 @@ void AddUser::MakePost()
const std::wstring & email = cur->request->PostVar(L"email");
bool autoactivate = false;
// for slog and locale from fun_passwd to work correctly
// but in the future IsPasswordCorrect will be moved to User class
// or some other place
functions->fun_passwd.set_dependency(this);
if( !IsLoginCorrect(login, true) ||
!IsEmailCorrect(email, true) ||
!functions->fun_passwd.IsPasswordCorrect(pass, conf_pass, true) )