fix: correctly activate a user account
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2021, Tomasz Sowa
|
* Copyright (c) 2013-2024, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* 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)
|
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->status = WINIX_ACCOUNT_READY;
|
||||||
puser->admin_env.remove(L"activation_code");
|
puser->admin_env.remove(L"activation_code");
|
||||||
|
Reference in New Issue
Block a user