当前位置: 首页>>代码示例>>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;未经允许,请勿转载。