fix: correctly activate a user account
This commit is contained in:
parent
612501217c
commit
d122917f83
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013-2021, Tomasz Sowa
|
||||
* Copyright (c) 2013-2024, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -55,11 +55,11 @@ Account::Account()
|
|||
|
||||
bool Account::ActivateAccount(User * puser, long code, bool use_ses_log)
|
||||
{
|
||||
std::wstring * user_code_str = puser->admin_env.get_wstr(L"activation_code");
|
||||
pt::Space * user_code_space = puser->admin_env.get_space(L"activation_code");
|
||||
|
||||
if( user_code_str )
|
||||
if( user_code_space )
|
||||
{
|
||||
if( Tol(*user_code_str) == code )
|
||||
if( user_code_space->to_long() == code )
|
||||
{
|
||||
puser->status = WINIX_ACCOUNT_READY;
|
||||
puser->admin_env.remove(L"activation_code");
|
||||
|
|
Loading…
Reference in New Issue