{/foreach}
</ul>
-{if $birthdayUserProfiles|count >= 5}
+{if $birthdayUserProfiles|count >= 10}
<a class="jsTodaysBirthdays button small more jsOnly">{lang}wcf.global.button.showAll{/lang}</a>
<script data-relocate="true">
public function init(DashboardBox $box, IPage $page) {
parent::init($box, $page);
- if (MODULE_USERS_ONLINE && count(WCF::getUserProfileHandler()->getFollowingUsers())) {
+ if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList') && count(WCF::getUserProfileHandler()->getFollowingUsers())) {
$this->usersOnlineList = new UsersOnlineList();
$this->usersOnlineList->getConditionBuilder()->add('session.userID IN (?)', array(WCF::getUserProfileHandler()->getFollowingUsers()));
+ $this->usersOnlineList->sqlLimit = 10;
$this->usersOnlineList->readObjects();
}
$userProfileList->readObjects();
$i = 0;
foreach ($userProfileList as $userProfile) {
- if ($i == 5) break;
+ if ($i == 10) break;
if (!$userProfile->isProtected() && substr($userProfile->birthday, 5) == $currentDay) {
$this->userProfiles[] = $userProfile;
$userProfileList = new UserProfileList();
$userProfileList->setObjectIDs($userIDs);
$userProfileList->readObjects();
+ $i = 0;
foreach ($userProfileList as $userProfile) {
+ if ($i == 10) break;
+
if (!$userProfile->isProtected() && substr($userProfile->birthday, 5) == $currentDay) {
$this->userProfiles[] = $userProfile;
+ $i++;
}
}
}
public function init(DashboardBox $box, IPage $page) {
parent::init($box, $page);
- if (MODULE_USERS_ONLINE) {
+ if (MODULE_USERS_ONLINE && WCF::getSession()->getPermission('user.profile.canViewUsersOnlineList')) {
$this->usersOnlineList = new UsersOnlineList();
$this->usersOnlineList->readStats();
$this->usersOnlineList->checkRecord();