2012-02-28 22:09:44 +01:00
|
|
|
/*
|
|
|
|
* This file is a part of Winix
|
|
|
|
* and is not publicly distributed
|
|
|
|
*
|
|
|
|
* Copyright (c) 2012, Tomasz Sowa
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef headerfile_winix_functions_pw
|
|
|
|
#define headerfile_winix_functions_pw
|
|
|
|
|
|
|
|
#include "functionbase.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Fun
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
class Pw : public FunctionBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
Pw();
|
|
|
|
|
|
|
|
bool HasAccess();
|
2012-03-09 23:56:54 +01:00
|
|
|
void MakePost();
|
2012-02-28 22:09:44 +01:00
|
|
|
void MakeGet();
|
|
|
|
|
|
|
|
bool ActivateAccount(const std::wstring & login, long code, bool use_ses_log = false);
|
2012-03-09 23:56:54 +01:00
|
|
|
bool ResetPassword(const std::wstring & login, long code, bool use_ses_log = false, bool only_check_access = false);
|
2012-02-28 22:09:44 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
bool ActivateAccount(User * puser, long code, bool use_ses_log);
|
2012-03-09 23:56:54 +01:00
|
|
|
bool ResetPassword(User * puser, long code, bool use_ses_log);
|
2012-02-28 22:09:44 +01:00
|
|
|
void ActivateAccount();
|
2012-03-09 23:56:54 +01:00
|
|
|
bool SetNewPassword(User * puser, bool use_ses_log);
|
|
|
|
bool ResetPassword(User * puser, long code, bool use_ses_log, bool only_check_access);
|
|
|
|
void ResetPassword();
|
|
|
|
void ShowResetPasswordForm();
|
2012-02-28 22:09:44 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
#endif
|