- updated to the new pikotools api (child spaces were removed)
some plugins need to be fixed yet: ticket, gallery, group, menu - added current user to default models as "user" - renamed in User: super_user -> is_super_user, env -> admin_env, pass_hash_salted -> is_pass_hash_salted - now Users class has a WinixModel as a base class some plugin calls have to be fixed yet - added UserWrapper model with a pointer to User class - removed from ItemContent: methods for accessing 'meta' and 'admin_meta', now ezc can iterate through Space classes - fixed in env winix function: if there is "changeuser" parameter then we should only switch the user (not save anything)
This commit is contained in:
@@ -117,7 +117,7 @@ bool result = false;
|
||||
result = puser->update();
|
||||
|
||||
if( result )
|
||||
log << log2 << "Passwd: password for user " << puser->name << " has been changed" << logend;
|
||||
log << log2 << "Passwd: password for user " << puser->login << " has been changed" << logend;
|
||||
else
|
||||
log << log1 << "Passwd: I cannot change password -- database problem" << logend;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ long user_id;
|
||||
const std::wstring & pass_new = cur->request->PostVar(L"passwordnew");
|
||||
const std::wstring & pass_conf = cur->request->PostVar(L"passwordconfirm");
|
||||
|
||||
if( !cur->session->puser->super_user && !functions->fun_login.CheckUserPass(puser->name, pass_cur, user_id) )
|
||||
if( !cur->session->puser->is_super_user && !functions->fun_login.CheckUserPass(puser->login, pass_cur, user_id) )
|
||||
{
|
||||
log << log3 << "Passwd: incorrect current password" << logend;
|
||||
slog << logerror << T("passwd_err_bad_current_password") << logend;
|
||||
@@ -190,7 +190,7 @@ return result;
|
||||
|
||||
bool Passwd::ResetPassword(User * puser, long code, bool use_ses_log, bool only_check_access)
|
||||
{
|
||||
std::wstring * user_code_str = puser->aenv.get_wstr(L"password_change_code");
|
||||
std::wstring * user_code_str = puser->admin_env.get_wstr(L"password_change_code");
|
||||
|
||||
if( user_code_str )
|
||||
{
|
||||
@@ -230,7 +230,7 @@ bool Passwd::ResetPassword(const std::wstring & login, long code, bool use_ses_l
|
||||
{
|
||||
long t = static_cast<long>(cur->request->start_time);
|
||||
|
||||
if( puser->aenv.to_long(L"password_change_time") + config->reset_password_code_expiration_time > t )
|
||||
if( puser->admin_env.to_long(L"password_change_time") + config->reset_password_code_expiration_time > t )
|
||||
{
|
||||
result = ResetPassword(puser, code, use_ses_log, only_check_access);
|
||||
}
|
||||
@@ -297,10 +297,10 @@ const std::wstring * plogin;
|
||||
|
||||
if( cur->session->puser )
|
||||
{
|
||||
if( cur->session->puser->super_user )
|
||||
if( cur->session->puser->is_super_user )
|
||||
plogin = &cur->request->PostVar(L"login");
|
||||
else
|
||||
plogin = &cur->session->puser->name;
|
||||
plogin = &cur->session->puser->login;
|
||||
|
||||
User * puser = system->users.GetUser(*plogin);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user