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:
Tomasz Sowa 2021-01-25 18:41:28 +01:00
parent 499db7e3eb
commit 4625451c85
2 changed files with 8 additions and 5 deletions

View File

@ -94,11 +94,9 @@ void WinixRequest::set_dependency(WinixSystem * winix_system)
void WinixRequest::set_dependency(WinixRequest * winix_request)
{
WinixSystem::set_dependency(winix_request);
cur = winix_request->cur;
locale = winix_request->locale;
session_manager = winix_request->session_manager;
// CHECK ME what about slog
set_cur(winix_request->cur);
set_locale(winix_request->locale);
set_session_manager(winix_request->session_manager);
}

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) )