本文整理汇总了PHP中ipsRegistry::member方法的典型用法代码示例。如果您正苦于以下问题:PHP ipsRegistry::member方法的具体用法?PHP ipsRegistry::member怎么用?PHP ipsRegistry::member使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ipsRegistry
的用法示例。
在下文中一共展示了ipsRegistry::member方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct(ipsRegistry $registry)
{
//-----------------------------------------
// Make object references
//-----------------------------------------
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings = $registry->settings();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->request();
set_time_limit(0);
if (strpos(strtolower(PHP_OS), 'win') === 0) {
$this->dir_split = "\\";
}
//-----------------------------------------
// Known names
//-----------------------------------------
$KNOWN_NAMES = array();
require IPS_ROOT_PATH . 'sources/classes/virusChecker/lib_known_names.php';
/*noLibHook*/
$this->known_names = $KNOWN_NAMES;
}
示例2: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct(ipsRegistry $registry)
{
$this->DB = $registry->DB();
$this->settings = $registry->settings();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->request();
}
示例3: __construct
/**
* Constructor
*
* @access public
* @param object Registry reference
* @return @e void
*/
public function __construct(ipsRegistry $registry)
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings = $registry->fetchSettings();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->fetchRequest();
$this->lang = $registry->class_localization;
}
示例4: returnRSSDocument
/**
* Grab the RSS document content and return it
*
* @return string RSS document
*/
public function returnRSSDocument()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval(ipsRegistry::$request['member_id']);
$secure_key = IPSText::md5Clean(ipsRegistry::$request['rss_key']);
$rss_data = array();
$to_print = '';
if ($secure_key and $member_id) {
if ($member_id == ipsRegistry::member()->getProperty('member_id')) {
//-----------------------------------------
// Get RSS export
//-----------------------------------------
$rss_data = ipsRegistry::DB()->buildAndFetch(array('select' => 'rss_cache', 'from' => 'rc_modpref', 'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'"));
//-----------------------------------------
// Got one?
//-----------------------------------------
if ($rss_data['rss_cache']) {
return $rss_data['rss_cache'];
}
}
//-----------------------------------------
// Create a dummy one
//-----------------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_reports'), 'core');
$classToLoad = IPSLib::loadLibrary(IPS_KERNEL_PATH . 'classRss.php', 'classRss');
$rss = new $classToLoad();
$channel_id = $rss->createNewChannel(array('title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'], 'link' => ipsRegistry::$settings['board_url'], 'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'], 'pubDate' => $rss->formatDate(time())));
$rss->createRssDocument();
return $rss->rss_document;
}
}
示例5: __construct
/**
* Constructor
*
* @access public
* @param object Registry reference
* @return void
*/
public function __construct(ipsRegistry $registry)
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings = $registry->fetchSettings();
$this->member = $registry->member();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->fetchRequest();
$this->lang = $registry->class_localization;
if (IN_ACP) {
//-----------------------------------------
// Load HTML
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_blocks_feed');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=blocks&section=wizard';
$this->form_code_js = $this->html->form_code_js = 'module=blocks§ion=wizard';
}
//-----------------------------------------
// Get interface
//-----------------------------------------
require_once IPSLib::getAppDir('ccs') . '/sources/blocks/feed/feedInterface.php';
}
示例6: getContentUrl
/**
* Get Content URL
*
* @param array $warning Row from members_warn_logs
* @return @e array array( url => URL to the content the warning came from, title => Title )
*/
public function getContentUrl($warning)
{
ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_profile'), 'members');
if ($warning['wl_content_id1']) {
$post = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'message_posts', 'where' => "msg_id=" . intval($warning['wl_content_id1'])));
if (!empty($post['msg_topic_id'])) {
$topic = ipsRegistry::DB()->buildAndFetch(array('select' => '*', 'from' => 'message_topics', 'where' => "mt_id={$post['msg_topic_id']}"));
if (!empty($topic['mt_id'])) {
ipsRegistry::DB()->build(array('select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_topic_id={$post['msg_topic_id']}"));
ipsRegistry::DB()->execute();
while ($row = ipsRegistry::DB()->fetch()) {
if ($row['map_user_id'] == ipsRegistry::member()->getProperty('member_id')) {
return array('url' => ipsRegistry::getClass('output')->buildUrl("app=members&module=messaging&section=view&do=findMessage&topicID={$topic['mt_id']}&msgID={$post['msg_id']}"), 'title' => $topic['mt_title']);
}
}
return array('url' => ipsRegistry::getClass('output')->buildUrl("app=core&module=reports§ion=reports&do=showMessage&topicID={$topic['mt_id']}&msg={$post['msg_id']}"), 'title' => $topic['mt_title']);
}
}
} else {
$member = IPSMember::load($warning['wl_member']);
if (!empty($member['member_id'])) {
return array('url' => ipsRegistry::getClass('output')->buildSEOUrl("showuser={$member['member_id']}", 'public', $member['members_seo_name'], 'showuser'), 'title' => ipsRegistry::getClass('class_localization')->words['warnings_profile']);
}
}
}
示例7: parseOnlineEntries
/**
* Parse/format the online list data for the records
*
* @access public
* @author Brandon Farber
* @param array Online list rows to check against
* @return array Online list rows parsed
*/
public function parseOnlineEntries($rows)
{
if (!is_array($rows) or !count($rows)) {
return $rows;
}
$final = array();
foreach ($rows as $row) {
if ($row['current_appcomponent'] == 'core') {
if ($row['current_module'] == 'global') {
if ($row['current_section'] == 'login') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_login'];
}
} else {
if ($row['current_module'] == 'search') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_search'];
} else {
if ($row['current_module'] == 'reports') {
$rcCache = ipsRegistry::cache()->getCache('report_cache');
if (is_array($rcCache)) {
if ($rcCache['group_access'][ipsRegistry::member()->getProperty('member_group_id')] == true) {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_reports'];
}
}
}
}
}
}
$final[$row['id']] = $row;
}
return $final;
}
示例8: getSidebarLinks
/**
* Returns sidebar links for this tab
* You may return an empty array or FALSE to not have
* any links show in the sidebar for this block.
*
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
* is added automatically.
*
* The image must be a full URL or blank to use a default image.
*
* Use the format:
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
*
* @author Matt Mecham
* @param array Member data
* @return array Array of links
*/
public function getSidebarLinks($member = array())
{
$array = array();
if ($member['failed_login_count']) {
$array[] = array('img' => '', 'url' => "app=members&module=members&section=tools&do=do_locked&auth_key=" . ipsRegistry::member()->form_hash . "&mid_{$member['member_id']}=1&type=unlock", 'title' => ipsRegistry::getClass('class_localization')->words['reset_failed_logins']);
}
return $array;
}
示例9: parseOnlineEntries
/**
* Parse/format the online list data for the records
*
* @author Brandon Farber
* @param array Online list rows to check against
* @return array Online list rows parsed
*/
public function parseOnlineEntries($rows)
{
if (!is_array($rows) or !count($rows)) {
return $rows;
}
$final = array();
$profiles = array();
$members = array();
//-----------------------------------------
// Extract the topic/forum data
//-----------------------------------------
foreach ($rows as $row) {
if ($row['current_appcomponent'] != 'members' or !$row['current_module']) {
continue;
}
if ($row['current_module'] == 'profile') {
$profiles[] = $row['location_1_id'];
}
}
if (count($profiles)) {
ipsRegistry::DB()->build(array('select' => 'member_id, members_display_name, members_seo_name, member_banned, members_bitoptions', 'from' => 'members', 'where' => 'member_id IN(' . implode(',', $profiles) . ')'));
$pr = ipsRegistry::DB()->execute();
while ($r = ipsRegistry::DB()->fetch($pr)) {
/* Setup bitwise option to check for banned/spammer members */
$r = IPSMember::buildBitWiseOptions($r);
if (!IPSMember::isInactive($r) || ipsRegistry::member()->getProperty('g_is_supmod')) {
$members[$r['member_id']] = array('members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name']);
}
}
}
foreach ($rows as $row) {
if ($row['current_appcomponent'] == 'members') {
if ($row['current_module'] == 'online') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_online'];
}
if ($row['current_module'] == 'list') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_members'];
}
if ($row['current_module'] == 'messaging') {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_msg'];
}
if ($row['current_module'] == 'profile') {
if (isset($members[$row['location_1_id']])) {
$row['where_line'] = ipsRegistry::getClass('class_localization')->words['WHERE_profile'];
$row['where_line_more'] = $members[$row['location_1_id']]['members_display_name'];
$row['where_link'] = 'showuser=' . $row['location_1_id'];
$row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl($row['where_link'], 'public', $members[$row['location_1_id']]['members_seo_name'], 'showuser');
}
}
}
$final[$row['id']] = $row;
}
return $final;
}
示例10: __construct
/**
* Constructor
*
* @access public
* @return @e void
*/
public function __construct()
{
/* Make object */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->getClass('class_localization');
self::$Perms['memberData'] = is_array(self::$Perms['memberData']) ? self::$Perms['memberData'] : ipsRegistry::member()->fetchMemberData();
}
示例11: __construct
/**
* Setup registry objects
*
* @access public
* @param object ipsRegistry $registry
* @return void
*/
public function __construct(ipsRegistry $registry)
{
$this->DB = $registry->DB();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->settings = $registry->settings();
$this->request = $registry->request();
/* Do we have the sphinxes? */
if (!file_exists('sphinxapi.php')) {
$registry->output->showError('sphinx_api_missing', 10182);
}
/* Load Sphinx */
require 'sphinxapi.php';
$this->sphinxClient = new SphinxClient();
$this->sphinxClient->SetServer($this->settings['search_sphinx_server'], intval($this->settings['search_sphinx_port']));
$this->sphinxClient->SetMatchMode(SPH_MATCH_EXTENDED);
$this->sphinxClient->SetLimits(0, 1000);
/* We're going to need the regular app index plugin also */
require_once IPSLib::getAppDir(ipsRegistry::$request['search_app']) . '/extensions/searchPlugin.php';
$searchApp = 'search' . ucfirst($this->request['search_app']) . 'Plugin';
$this->appSearchPlugin = new $searchApp($registry);
}
示例12: userCanViewAds
/**
* Checks to see if the specified member group can view ads
*
* @access public
*
* @param integer $group_id Group to check
* @return bool
*/
public function userCanViewAds()
{
/* Check to see if the system is globally disabled */
if (!ipsRegistry::$settings['ad_code_global_enabled']) {
return false;
}
/* Check to see if this member group can view ads */
if (ipsRegistry::$settings['ad_code_exempt_groups']) {
if (IPSMember::isInGroup(ipsRegistry::member()->fetchMemberData(), explode(',', ipsRegistry::$settings['ad_code_exempt_groups']))) {
return false;
}
}
return true;
}
示例13: authenticateLogIn
/**
* Authenticate log in
*
* @access public
* @param string Username (from $this->request)
* @param string Password (from $this->request)
* @return mixed TRUE if successful, string (message) if not
*/
public function authenticateLogIn($username, $password)
{
/* Log in type */
$loginType = $this->_fetchLogInType();
$where = $loginType == 'username' ? $this->DB->buildLower('m.name') . "='" . mb_strtolower($username) . "'" : "m.email='" . mb_strtolower($username) . "'";
/* Attempt to load member */
$this->DB->build(array('select' => 'm.*', 'from' => array('members' => 'm'), 'where' => $where, 'add_join' => array(array('select' => 'g.*', 'from' => array('groups' => 'g'), 'where' => 'g.g_id=m.mgroup'), array('select' => 'c.*', 'from' => array('members_converge' => 'c'), 'where' => 'c.converge_email=m.email'))));
$this->DB->execute();
$mem = $this->DB->fetch();
/* Check it out */
if (!$mem['id'] or !$mem['converge_pass_hash']) {
return 'Пользователь не найден';
}
if ($mem['converge_pass_hash'] != md5(md5($mem['converge_pass_salt']) . md5($password))) {
return 'Неверный пароль';
}
/* Test seconday groups */
$mem = ipsRegistry::member()->setUpSecondaryGroups($mem);
if ($mem['g_access_cp'] != 1) {
return 'У вас нет доступа к системе обновления';
}
/* Set up _member */
$this->loadMemberData($mem['id']);
/* Still here? */
return TRUE;
}
示例14: new_likes
function new_likes()
{
return (bool) (ipsRegistry::$settings['reputation_enabled'] and !in_array(ipsRegistry::member()->getProperty('member_group_id'), explode(',', ipsRegistry::$settings['reputation_protected_groups'])) and ipsRegistry::$settings['reputation_point_types'] == 'like');
}
示例15: __construct
/**
* Setup registry objects
*
* @access public
* @param object ipsRegistry $registry
* @return void
*/
public function __construct(ipsRegistry $registry)
{
$this->registry = $registry;
$this->DB = $registry->DB();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->settings =& $this->registry->fetchSettings();
}