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


PHP User::getID方法代码示例

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


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

示例1: removeMember

 public function removeMember(\thebuggenie\core\entities\User $user)
 {
     if ($this->_members !== null) {
         unset($this->_members[$user->getID()]);
     }
     if ($this->_num_members !== null) {
         $this->_num_members--;
     }
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:9,代码来源:Group.php

示例2: loadFixtures

 /**
  * Load user fixtures for a specified scope
  *
  * @param Scope $scope
  * @param Group $admin_group
  * @param Group $user_group
  * @param Group $guest_group
  */
 public static function loadFixtures(Scope $scope, Group $admin_group, Group $user_group, Group $guest_group)
 {
     $adminuser = new User();
     $adminuser->setUsername('administrator');
     $adminuser->setRealname('Administrator');
     $adminuser->setBuddyname('Admin');
     $adminuser->setGroup($admin_group);
     $adminuser->setPassword('admin');
     $adminuser->setActivated();
     $adminuser->setEnabled();
     $adminuser->setAvatar('admin');
     $adminuser->save();
     $guestuser = new User();
     $guestuser->setUsername('guest');
     $guestuser->setRealname('Guest user');
     $guestuser->setBuddyname('Guest user');
     $guestuser->setGroup($guest_group);
     $guestuser->setPassword('password');
     // Settings not active yet
     $guestuser->setActivated();
     $guestuser->setEnabled();
     $guestuser->save();
     framework\Settings::saveSetting('defaultuserid', $guestuser->getID(), 'core', $scope->getID());
     return array($guestuser->getID(), $adminuser->getID());
 }
开发者ID:underblaze,项目名称:thebuggenie-4.1.0,代码行数:33,代码来源:User.php

示例3: _getArticleRelatedUsers

 protected function _getArticleRelatedUsers(Article $article, User $triggered_by_user = null)
 {
     $u_id = $triggered_by_user instanceof User ? $triggered_by_user->getID() : $triggered_by_user;
     $users = $article->getSubscribers();
     foreach ($users as $key => $user) {
         if ($user->getNotificationSetting(self::NOTIFY_SUBSCRIBED_ARTICLES, true, 'mailing')->isOff()) {
             unset($users[$key]);
         }
         if ($user->getNotificationSetting(self::NOTIFY_UPDATED_SELF, true, 'mailing')->isOff() && $user->getID() == $u_id) {
             unset($users[$key]);
         }
         if ($user->getNotificationSetting(self::NOTIFY_ITEM_ONCE, false, 'mailing')->isOn() && $user->getNotificationSetting(self::NOTIFY_ITEM_ONCE . '_article_' . $article->getID(), false, 'mailing')->isOn()) {
             unset($users[$key]);
         }
     }
     return $users;
 }
开发者ID:RTechSoft,项目名称:thebuggenie,代码行数:17,代码来源:Mailing.php

示例4: getPlanningColumns

 /**
  * @param \thebuggenie\core\entities\User $user
  * @return array
  */
 public function getPlanningColumns(\thebuggenie\core\entities\User $user)
 {
     $columns = framework\Settings::get('planning_columns_' . $this->getID(), 'project', framework\Context::getScope()->getID(), $user->getID());
     $columns = explode(',', $columns);
     if (empty($columns) || isset($columns[0]) && empty($columns[0])) {
         // Default values
         $columns = array('priority', 'estimated_time', 'spent_time');
     }
     // Set array keys to equal array values
     $columns = array_combine($columns, $columns);
     return $columns;
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:16,代码来源:Project.php

示例5: isFriend

 /**
  * Check if the given user is a friend of this user
  *
  * @param \thebuggenie\core\entities\User $user The user to check
  *
  * @return boolean
  */
 public function isFriend($user)
 {
     $this->_setupFriends();
     if (empty($this->_friends)) {
         return false;
     }
     return array_key_exists($user->getID(), $this->_friends);
 }
开发者ID:underblaze,项目名称:thebuggenie-4.1.0,代码行数:15,代码来源:User.php

示例6: removeMember

 public function removeMember(\thebuggenie\core\entities\User $user)
 {
     if ($this->_members !== null) {
         unset($this->_members[$user->getID()]);
     }
     if ($this->_num_members !== null) {
         $this->_num_members--;
     }
     tables\TeamMembers::getTable()->removeUserFromTeam($user->getID(), $this->getID());
 }
开发者ID:JonathanRH,项目名称:thebuggenie,代码行数:10,代码来源:Team.php

示例7: User__populateStarredArticles

 /**
  * Populate the array of starred articles
  */
 protected function User__populateStarredArticles(User $user)
 {
     if ($user->_isset('publish', 'starredarticles') === null) {
         $articles = UserArticles::getTable()->getUserStarredArticles($user->getID());
         $user->_store('publish', 'starredarticles', $articles);
     }
 }
开发者ID:nrensen,项目名称:thebuggenie,代码行数:10,代码来源:Publish.php

示例8: startWorkingOnIssue

 /**
  * Register a user as working on the issue
  *
  * @param \thebuggenie\core\entities\User $user
  */
 public function startWorkingOnIssue(User $user)
 {
     $this->_addChangedProperty('_being_worked_on_by_user', $user->getID());
     $this->_being_worked_on_by_user_since = NOW;
 }
开发者ID:AzerothShard,项目名称:thebuggenie,代码行数:10,代码来源:Issue.php

示例9: isViewableByUser

 /**
  * Return if the specified user can view this comment
  *
  * @param \thebuggenie\core\entities\User $user A User
  *
  * @return boolean
  */
 public function isViewableByUser(\thebuggenie\core\entities\User $user)
 {
     $can_view = false;
     try {
         // Show comment if valid user and...
         if ($user instanceof \thebuggenie\core\entities\User) {
             if (!$this->isPublic() && $user->canSeeNonPublicComments() || $this->isPublic() && $user->canViewComments() || $this->postedByUser($user->getID())) {
                 $can_view = true;
             }
             //endif
         }
         //endif
     } catch (\Exception $e) {
     }
     return $can_view;
 }
开发者ID:founderio,项目名称:thebuggenie,代码行数:23,代码来源:Comment.php

示例10: _getArticleRelatedUsers

 protected function _getArticleRelatedUsers(Article $article, User $triggered_by_user = null)
 {
     $u_id = $triggered_by_user instanceof User ? $triggered_by_user->getID() : $triggered_by_user;
     $subscribers = $article->getSubscribers();
     $users = array();
     foreach ($subscribers as $user) {
         if ($user->getNotificationSetting(self::NOTIFY_SUBSCRIBED_ARTICLES, true, 'mailing')->isOff()) {
             unset($users[$user->getID()]);
         }
         if ($user->getNotificationSetting(self::NOTIFY_UPDATED_SELF, true, 'mailing')->isOff() && $user->getID() == $u_id) {
             unset($users[$user->getID()]);
         }
         if ($user->getNotificationSetting(self::NOTIFY_ITEM_ONCE, false, 'mailing')->isOn() && $user->getNotificationSetting(self::NOTIFY_ITEM_ONCE . '_article_' . $article->getID(), false, 'mailing')->isOn()) {
             unset($users[$user->getID()]);
         }
         if ($user->getNotificationSetting(framework\Settings::SETTINGS_USER_NOTIFY_ONLY_IN_BOX_WHEN_ACTIVE, false, 'core')->isOn() && $user->isActive()) {
             unset($users[$user->getID()]);
         }
     }
     $mentioned_users = $article->getMentionedUsers();
     foreach ($mentioned_users as $user) {
         $users[$user->getID()] = $user;
         if ($user->getNotificationSetting(self::NOTIFY_MENTIONED, true, 'mailing')->isOff()) {
             unset($users[$user->getID()]);
         }
         if ($user->getNotificationSetting(self::NOTIFY_ITEM_ONCE, false, 'mailing')->isOn() && $user->getNotificationSetting(self::NOTIFY_ITEM_ONCE . '_article_' . $article->getID(), false, 'mailing')->isOn()) {
             unset($users[$user->getID()]);
         }
         if ($user->getNotificationSetting(framework\Settings::SETTINGS_USER_NOTIFY_ONLY_IN_BOX_WHEN_ACTIVE, false, 'core')->isOn() && $user->isActive()) {
             unset($users[$user->getID()]);
         }
     }
     return $users;
 }
开发者ID:pkdevboxy,项目名称:thebuggenie,代码行数:34,代码来源:Mailing.php


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