fix: correctly activate a user account

This commit is contained in:
Tomasz Sowa 2024-05-27 18:22:47 +02:00
parent 612501217c
commit d122917f83
Signed by: tomasz.sowa
GPG Key ID: 662CC1438638588B
1 changed files with 4 additions and 4 deletions

View File

@ -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");