當前位置: 首頁>>代碼示例>>PHP>>正文


PHP group::getUsersInGroup方法代碼示例

本文整理匯總了PHP中group::getUsersInGroup方法的典型用法代碼示例。如果您正苦於以下問題:PHP group::getUsersInGroup方法的具體用法?PHP group::getUsersInGroup怎麽用?PHP group::getUsersInGroup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在group的用法示例。


在下文中一共展示了group::getUsersInGroup方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: time

             $from_name = $user->firstname . " " . $user->lastname . " (" . $user->username . ")";
         } else {
             $db_data->user_id = 0;
         }
         $db_data->timestamp = time();
     }
     $db->insertObject($db_data, 'formbuilder_' . $f->table_name);
 }
 //Email stuff here...
 //Don't send email if this is an edit.
 if ($f->is_email == 1 && !isset($_POST['data_id'])) {
     //Building Email List...
     $emaillist = array();
     foreach ($db->selectObjects("formbuilder_address", "form_id=" . $f->id) as $address) {
         if ($address->group_id != 0) {
             foreach (group::getUsersInGroup(group::getGroupById($address->group_id)) as $locUser) {
                 if ($locUser->email != '') {
                     $emaillist[] = $locUser->email;
                 }
             }
         } else {
             if ($address->user_id != 0) {
                 $locUser = user::getUserById($address->user_id);
                 if ($locUser->email != '') {
                     $emaillist[] = $locUser->email;
                 }
             } else {
                 if ($address->email != '') {
                     $emaillist[] = $address->email;
                 }
             }
開發者ID:notzen,項目名稱:exponent-cms,代碼行數:31,代碼來源:submit_form.php

示例2: array

$headers = array("From" => $from = $config->email_from_reminder, "Reply-to" => $reply = $config->email_reply_reminder);
// set up the html message
$template->assign("showdetail", $config->email_showdetail);
$htmlmsg = $template->render();
// now the same thing for the text message
$msg = chop(strip_tags(str_replace(array("<br />", "<br>", "br/>"), "\n", $htmlmsg)));
// Saved.  do notifs
$notifs = unserialize($config->reminder_notify);
$emails = array();
foreach ($db->selectObjects('calendar_reminder_address', "calendar_id='" . $config->id . "'") as $c) {
    if ($c->user_id != 0) {
        $u = user::getUserById($c->user_id);
        $emails[] = $u->email;
    } else {
        if ($c->group_id != 0) {
            $grpusers = group::getUsersInGroup($c->group_id);
            foreach ($grpusers as $u) {
                $emails[] = $u->email;
            }
        } else {
            if ($c->email != '') {
                $emails[] = $c->email;
            }
        }
    }
}
if (empty($emails)) {
    print_r("<br><b><i>Exponent - " . gt('No One to Send Reminders to!') . "</i></b><br>");
    exit;
}
$emails = array_flip(array_flip($emails));
開發者ID:notzen,項目名稱:exponent-cms,代碼行數:31,代碼來源:send_reminders.php


注:本文中的group::getUsersInGroup方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。