winix/functions/login.h

46 lines
732 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2011, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_functions_login
#define headerfile_winix_functions_login
#include "functionbase.h"
#include "core/user.h"
namespace Fun
{
class Login : public FunctionBase
{
public:
Login();
void MakePost();
bool CheckUserPass(const std::wstring & login, const std::wstring & password, long & user_id);
private:
void LoginUser(long user_id, bool remember_me);
void ClearTmpStruct();
bool CheckPasswords(const std::wstring & password);
UserPass up, up2;
std::string pass_decrypted;
std::wstring pass_hashed;
std::wstring salt;
};
} // namespace
#endif