added: flag has_pass to User structure
if false that means the user has not set a password yet (this can be used by a plugins to create a new account without a password set) in order to login the user first has to set a new password (this can be done from a some kind of activation link send via email etc) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@954 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -32,6 +32,7 @@ namespace Winix
|
||||
#define WINIX_ACCOUNT_NOT_ACTIVATED 1
|
||||
|
||||
// 2 - a user clicked on the link in the mail and now can normally use his account
|
||||
// (if has a password set too)
|
||||
#define WINIX_ACCOUNT_READY 2
|
||||
|
||||
// 3 - account was suspended
|
||||
@@ -41,6 +42,9 @@ namespace Winix
|
||||
#define WINIX_ACCOUNT_BLOCKED 4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
a user can login only to an account which status is equal to WINIX_ACCOUNT_READY
|
||||
|
||||
@@ -62,6 +66,8 @@ namespace Winix
|
||||
*/
|
||||
struct UserPass
|
||||
{
|
||||
bool has_pass; // true if the user has a password set
|
||||
// if false the user cannot login
|
||||
int pass_type; // the kind of hash (WINIX_CRYPT_HASH_* see crypt.h)
|
||||
std::wstring pass; // password hashed or plain text if pass_type==0
|
||||
std::string pass_encrypted; // password encrypted
|
||||
@@ -79,7 +85,6 @@ struct User
|
||||
std::wstring email;
|
||||
int notify;
|
||||
|
||||
|
||||
// environment variables which can be set by this user
|
||||
// use 'env' winix function
|
||||
PT::Space env;
|
||||
@@ -99,7 +104,6 @@ struct User
|
||||
// time zone identifier
|
||||
size_t time_zone_id;
|
||||
|
||||
|
||||
User();
|
||||
|
||||
void Clear();
|
||||
|
Reference in New Issue
Block a user