当前位置: 首页>>代码示例>>PHP>>正文


PHP CBuser::advanceNoticeOfUsersNeeded方法代码示例

本文整理汇总了PHP中CBuser::advanceNoticeOfUsersNeeded方法的典型用法代码示例。如果您正苦于以下问题:PHP CBuser::advanceNoticeOfUsersNeeded方法的具体用法?PHP CBuser::advanceNoticeOfUsersNeeded怎么用?PHP CBuser::advanceNoticeOfUsersNeeded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBuser的用法示例。


在下文中一共展示了CBuser::advanceNoticeOfUsersNeeded方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveInviteEdit


//.........这里部分代码省略.........
				} elseif ( $this->params->get( 'groups_invites_list', 0 ) ) {
					$connections		=	array();
					$cbConnection		=	new cbConnection( (int) $user->get( 'id' ) );

					foreach( $cbConnection->getConnectedToMe( (int) $user->get( 'id' ) ) as $connection ) {
						$connections[]	=	(int) $connection->id;
					}

					if ( in_array( $selected, $connections ) ) {
						$row->set( 'user', (int) $selected );
					}
				}
			} else {
				$inviteByLimit			=	explode( '|*|', $this->params->get( 'groups_invites_by', '1|*|2|*|3|*|4' ) );

				if ( ! $inviteByLimit ) {
					$inviteByLimit		=	array( 1, 2, 3, 4 );
				}

				$recipient				=	new UserTable();

				if ( in_array( 1, $inviteByLimit ) && $recipient->load( (int) $to ) ) {
					$row->set( 'user', (int) $recipient->get( 'id' ) );
				} elseif ( in_array( 4, $inviteByLimit ) && cbIsValidEmail( $to ) ) {
					if ( $recipient->load( array( 'email' => $to ) ) ) {
						$row->set( 'user', (int) $recipient->get( 'id' ) );
					} else {
						$row->set( 'email', $to );
					}
				} elseif ( in_array( 2, $inviteByLimit ) && $recipient->load( array( 'username' => $to ) ) ) {
					$row->set( 'user', (int) $recipient->get( 'id' ) );
				} elseif ( in_array( 3, $inviteByLimit ) ) {
					$query				=	'SELECT cb.' . $_CB_database->NameQuote( 'id' )
										.	"\n FROM " . $_CB_database->NameQuote( '#__comprofiler' ) . " AS cb"
										.	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__users' ) . " AS j"
										.	' ON j.' . $_CB_database->NameQuote( 'id' ) . ' = cb.' . $_CB_database->NameQuote( 'id' )
										.	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_users' ) . " AS u"
										.	' ON u.' . $_CB_database->NameQuote( 'user_id' ) . ' = cb.' . $_CB_database->NameQuote( 'id' )
										.	' AND u.' . $_CB_database->NameQuote( 'group' ) . ' = ' . (int) $group->get( 'id' )
										.	"\n LEFT JOIN " . $_CB_database->NameQuote( '#__groupjive_invites' ) . " AS i"
										.	' ON i.' . $_CB_database->NameQuote( 'group' ) . ' = ' . (int) $group->get( 'id' )
										.	' AND i.' . $_CB_database->NameQuote( 'user' ) . ' = cb.' . $_CB_database->NameQuote( 'id' )
										.	"\n WHERE j." . $_CB_database->NameQuote( 'name' ) . " LIKE " . $_CB_database->Quote( '%' . $_CB_database->getEscaped( $to, true ) . '%', false )
										.	"\n AND cb." . $_CB_database->NameQuote( 'approved' ) . " = 1"
										.	"\n AND cb." . $_CB_database->NameQuote( 'confirmed' ) . " = 1"
										.	"\n AND j." . $_CB_database->NameQuote( 'block' ) . " = 0"
										.	"\n AND u." . $_CB_database->NameQuote( 'id' ) . " IS NULL"
										.	"\n AND i." . $_CB_database->NameQuote( 'id' ) . " IS NULL"
										.	"\n ORDER BY j." . $_CB_database->NameQuote( 'registerDate' ) . " DESC";
					$_CB_database->setQuery( $query, 0, 15 );
					$users				=	$_CB_database->loadResultArray();

					if ( $users ) {
						if ( count( $users ) > 1 ) {
							CBGroupJive::getTemplate( 'invite_list' );

							CBuser::advanceNoticeOfUsersNeeded( $users );

							HTML_groupjiveInviteList::showInviteList( $to, $users, $row, $group, $user, $this );
							return;
						} else {
							$row->set( 'user', (int) $users[0] );
						}
					}
				}
			}
		}

		if ( ( ! $isModerator ) && $this->params->get( 'groups_create_captcha', 0 ) && ( ! $skipCaptcha ) ) {
			$_PLUGINS->loadPluginGroup( 'user' );

			$_PLUGINS->trigger( 'onCheckCaptchaHtmlElements', array() );

			if ( $_PLUGINS->is_errors() ) {
				$row->setError( $_PLUGINS->getErrorMSG() );
			}
		}

		$new							=	( $row->get( 'id' ) ? false : true );

		if ( $row->getError() || ( ! $row->check() ) ) {
			$_CB_framework->enqueueMessage( CBTxt::T( 'GROUP_INVITE_FAILED_TO_SAVE', 'Invite failed to save! Error: [error]', array( '[error]' => $row->getError() ) ), 'error' );

			$this->showInviteEdit( $id, $user );
			return;
		}

		if ( $row->getError() || ( ! $row->store() ) ) {
			$_CB_framework->enqueueMessage( CBTxt::T( 'GROUP_INVITE_FAILED_TO_SAVE', 'Invite failed to save! Error: [error]', array( '[error]' => $row->getError() ) ), 'error' );

			$this->showInviteEdit( $id, $user );
			return;
		}

		if ( $new ) {
			cbRedirect( $returnUrl, CBTxt::T( 'Invite created successfully!' ) );
		} else {
			cbRedirect( $returnUrl, CBTxt::T( 'Invite saved successfully!' ) );
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:component.cbgroupjive.php

示例2: load

 public function load($userlist)
 {
     CBuser::advanceNoticeOfUsersNeeded($userlist);
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:4,代码来源:avatar.php

示例3: preFetchUsers

	/**
	 * Prefetches users
	 *
	 * @param TableInterface[] $rows
	 */
	static public function preFetchUsers( $rows )
	{
		if ( ! $rows ) {
			return;
		}

		$users				=	array();

		/** @var TableInterface[] $rows */
		foreach ( $rows as $row ) {
			$userId			=	(int) $row->get( 'user_id' );

			if ( $userId && ( ! in_array( $userId, $users ) ) ) {
				$users[]	=	$userId;
			}

			$userId			=	(int) $row->get( 'user' );

			if ( $userId && ( ! in_array( $userId, $users ) ) ) {
				$users[]	=	$userId;
			}
		}

		if ( $users ) {
			\CBuser::advanceNoticeOfUsersNeeded( $users );
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:CBGroupJive.php

示例4: load

	public function load($userlist) {
		if (method_exists('CBuser','advanceNoticeOfUsersNeeded')) {
			CBuser::advanceNoticeOfUsersNeeded($userlist);
		}
	}
开发者ID:rich20,项目名称:Kunena,代码行数:5,代码来源:avatar.php

示例5: load_users

 public static function load_users($system, $ids)
 {
     if (empty($ids)) {
         return;
     }
     switch ($system) {
         case 'cjforum':
             $api = JPATH_ROOT . '/components/com_cjforum/helpers/api.php';
             if (file_exists($api)) {
                 require_once $api;
                 CjForumApi::load_users($ids);
             }
             break;
         case 'cjblog':
             $api = JPATH_ROOT . DS . 'components' . DS . 'com_cjblog' . DS . 'api.php';
             if (file_exists($api)) {
                 require_once $api;
                 CjBlogApi::load_users($ids);
             }
             break;
         case 'kunena':
             if (CJFunctions::_initialize_kunena()) {
                 KunenaUserHelper::loadUsers($ids);
             }
         case 'cb':
             $api = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
             if (!is_file($api)) {
                 return;
             }
             require_once $api;
             cbimport('cb.database');
             cbimport('cb.tables');
             cbimport('language.front');
             cbimport('cb.tabs');
             cbimport('cb.field');
             global $ueConfig;
             CBuser::advanceNoticeOfUsersNeeded($ids);
             break;
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:40,代码来源:functions.php

示例6: prefetchUserProfiles

 /**
  * Function to prefetch users of selected profile/avatar component
  * 
  * @param string $system the profile/avatar component to use 
  * @param mixed $ids int/array of user ids to load
  */
 public function prefetchUserProfiles($system, $ids)
 {
     if (empty($ids)) {
         return;
     }
     $ids = array_unique($ids);
     switch ($system) {
         case 'cjforum':
             $api = JPATH_ROOT . '/components/com_cjforum/lib/api.php';
             if (file_exists($api)) {
                 require_once $api;
                 $api = CjForumApi::getProfileApi();
                 $api->load($ids);
             }
             break;
         case 'cjblog':
             $api = JPATH_ROOT . '/components/com_cjblog/api.php';
             if (file_exists($api)) {
                 require_once $api;
                 CjBlogApi::load_users($ids);
             }
             break;
         case 'kunena':
             if ($this->_initialize_kunena()) {
                 KunenaUserHelper::loadUsers($ids);
             }
             break;
         case 'cb':
             $api = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
             if (!is_file($api)) {
                 return;
             }
             require_once $api;
             cbimport('cb.database');
             cbimport('cb.tables');
             cbimport('language.front');
             cbimport('cb.tabs');
             cbimport('cb.field');
             global $ueConfig;
             CBuser::advanceNoticeOfUsersNeeded($ids);
             break;
     }
 }
开发者ID:pguilford,项目名称:vcomcc,代码行数:49,代码来源:api.php


注:本文中的CBuser::advanceNoticeOfUsersNeeded方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。