winix/functions/adduser.h

53 lines
920 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2012, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_functions_adduser
#define headerfile_winix_functions_adduser
#include "functionbase.h"
#include "core/user.h"
namespace Fun
{
class AddUser : public FunctionBase
{
public:
AddUser();
void MakePost();
void MakeGet();
bool IsLoginCorrect(const std::wstring & login, bool use_ses_log = false);
bool IsEmailCorrect(const std::wstring & email, bool use_ses_log = false);
bool HasLoginCorrectChars(const std::wstring & login);
bool AddNewUser(User & user, const std::wstring & pass);
bool AddNewUser(const std::wstring & login,
const std::wstring & pass,
const std::wstring & email,
bool autoactivate,
bool try_login,
bool use_ses_log = false);
private:
UserPass up;
User user;
};
} // namespace
#endif