66 lines
595 B
C++
Executable File
66 lines
595 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2012, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#include "user.h"
|
|
|
|
|
|
User::User()
|
|
{
|
|
Clear();
|
|
}
|
|
|
|
|
|
void User::Clear()
|
|
{
|
|
id = -1;
|
|
name.clear();
|
|
super_user = false;
|
|
groups.clear();
|
|
email.clear();
|
|
notify = 0;
|
|
env.Clear();
|
|
aenv.Clear();
|
|
status = WINIX_ACCOUNT_BLOCKED;
|
|
locale_id = 0;
|
|
time_zone_id = 0;
|
|
}
|
|
|
|
|
|
bool User::IsMemberOf(long group)
|
|
{
|
|
std::vector<long>::iterator i;
|
|
|
|
for(i=groups.begin() ; i!=groups.end() ; ++i)
|
|
if( *i == group )
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|