/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2012-2014, Tomasz Sowa * All rights reserved. * */ #include "user.h" namespace Winix { 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::iterator i; for(i=groups.begin() ; i!=groups.end() ; ++i) if( *i == group ) return true; return false; } } // namespace Winix