* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
const PERM_API_USER_READONLY = 'api_user_readonly';
const PERM_DIRECTORY_AX = 'directory_ax';
const PERM_DIRECTORY_PRIVATE = 'directory_private';
const PERM_API_USER_READONLY = 'api_user_readonly';
const PERM_DIRECTORY_AX = 'directory_ax';
const PERM_DIRECTORY_PRIVATE = 'directory_private';
const PERM_EDIT_DIRECTORY = 'edit_directory';
const PERM_FORUMS = 'forums';
const PERM_GROUPS = 'groups';
const PERM_EDIT_DIRECTORY = 'edit_directory';
const PERM_FORUMS = 'forums';
const PERM_GROUPS = 'groups';
FIND_IN_SET(\'watch\', a.flags) AS watch, a.comment,
a.weak_password IS NOT NULL AS weak_access, g.g_account_name IS NOT NULL AS googleapps,
a.token IS NOT NULL AS token_access, a.token, a.last_version,
FIND_IN_SET(\'watch\', a.flags) AS watch, a.comment,
a.weak_password IS NOT NULL AS weak_access, g.g_account_name IS NOT NULL AS googleapps,
a.token IS NOT NULL AS token_access, a.token, a.last_version,
$level = Visibility::VIEW_ADMIN;
} elseif ($this->checkPerms('directory_private')) {
$level = Visibility::VIEW_PRIVATE;
$level = Visibility::VIEW_ADMIN;
} elseif ($this->checkPerms('directory_private')) {
$level = Visibility::VIEW_PRIVATE;
if (!$this->_profile_fetched || $forceFetch) {
$this->_profile_fetched = true;
$this->_profile = Profile::get($this, $fields, $visibility);
if (!$this->_profile_fetched || $forceFetch) {
$this->_profile_fetched = true;
$this->_profile = Profile::get($this, $fields, $visibility);
$watch['watch_promos'] = XDB::fetchColumn('SELECT promo
FROM watch_promo
WHERE uid = {?}', $this->id());
$watch['watch_promos'] = XDB::fetchColumn('SELECT promo
FROM watch_promo
WHERE uid = {?}', $this->id());
$watch['watch_users'] = XDB::fetchColumn('SELECT ni_id
FROM watch_nonins
WHERE uid = {?}', $this->id());
$watch['watch_users'] = XDB::fetchColumn('SELECT ni_id
FROM watch_nonins
WHERE uid = {?}', $this->id());
unset($this->watch_users);
unset($this->watch_last);
unset($this->watch_promos);
unset($this->watch_users);
unset($this->watch_last);
unset($this->watch_promos);
- * register_pending, register_subs, watch_nonins, watch, watch_promo
+ * register_pending, register_subs, watch_nonins, watch, watch_promo, watch_group,
* *always keeps in: account_types, accounts, email_virtual, carvas,
* group_members, homonyms_list, newsletter_ins, register_mstats, email_source_account
* *deletes if $clearAll: account_auth_openid, announce_read, contacts,
* *always keeps in: account_types, accounts, email_virtual, carvas,
* group_members, homonyms_list, newsletter_ins, register_mstats, email_source_account
* *deletes if $clearAll: account_auth_openid, announce_read, contacts,
{
$tables = array('account_lost_passwords', 'register_marketing',
'register_pending', 'register_subs', 'watch_nonins',
{
$tables = array('account_lost_passwords', 'register_marketing',
'register_pending', 'register_subs', 'watch_nonins',