added: notifications to users' emails
(core/notify.h core/notify.cpp) templatesnotify directory all notifications are managed by a second thread git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@512 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -1227,7 +1227,7 @@ void Db::GetUsers(UGContainer<User> & user_table)
|
||||
AssertConnection();
|
||||
|
||||
std::ostringstream query;
|
||||
query << "select id, login, super_user, group_id from core.user left outer join core.group_mem on core.user.id = core.group_mem.user_id order by id asc;";
|
||||
query << "select id, login, super_user, group_id, email, cms_notify, thread_notify from core.user left outer join core.group_mem on core.user.id = core.group_mem.user_id order by id asc;";
|
||||
|
||||
r = AssertQuery( query.str() );
|
||||
AssertResultStatus(r, PGRES_TUPLES_OK);
|
||||
@@ -1238,6 +1238,9 @@ void Db::GetUsers(UGContainer<User> & user_table)
|
||||
int cname = AssertColumn(r, "login");
|
||||
int csuper_user = AssertColumn(r, "super_user");
|
||||
int cgroup_id = AssertColumn(r, "group_id");
|
||||
int cemail = AssertColumn(r, "email");
|
||||
int ccms_notify = AssertColumn(r, "cms_notify");
|
||||
int cthread_notify = AssertColumn(r, "thread_notify");
|
||||
|
||||
User u;
|
||||
long last_id = -1;
|
||||
@@ -1251,6 +1254,10 @@ void Db::GetUsers(UGContainer<User> & user_table)
|
||||
{
|
||||
u.name = AssertValue(r, i, cname);
|
||||
u.super_user = static_cast<bool>( atoi( AssertValue(r, i, csuper_user) ) );
|
||||
u.email = AssertValue(r, i, cemail);
|
||||
u.cms_notify = atoi( AssertValue(r, i, ccms_notify) );
|
||||
u.thread_notify = atoi( AssertValue(r, i, cthread_notify) );
|
||||
|
||||
log << log1 << "Db: get user: id:" << u.id << ", name:" << u.name << ", super_user:" << u.super_user << logend;
|
||||
|
||||
iter = user_table.PushBack( u );
|
||||
|
Reference in New Issue
Block a user