/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2008-2010, Tomasz Sowa * All rights reserved. * */ #ifndef headerfilecmslucoreuser #define headerfilecmslucoreuser #include #include struct User { long id; std::wstring name; bool super_user; std::vector groups; std::wstring email; int cms_notify; // !! bedziemy tylko jedno notify wykorzystywac (zmienic nazwe na notify) int thread_notify; // !! currently all users have the same offset // option in config: time_zone_offset int time_zone_offset; User() { Clear(); } void Clear() { id = -1; name.clear(); super_user = false; groups.clear(); email.clear(); cms_notify = 0; thread_notify = 0; time_zone_offset = 0; } bool IsMemberOf(long group) { std::vector::iterator i; for(i=groups.begin() ; i!=groups.end() ; ++i) if( *i == group ) return true; return false; } }; #endif