本文整理匯總了PHP中InboundEmail::getUserNameFromGroupId方法的典型用法代碼示例。如果您正苦於以下問題:PHP InboundEmail::getUserNameFromGroupId方法的具體用法?PHP InboundEmail::getUserNameFromGroupId怎麽用?PHP InboundEmail::getUserNameFromGroupId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類InboundEmail
的用法示例。
在下文中一共展示了InboundEmail::getUserNameFromGroupId方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
/* Start custom setup logic */
// status drop down
$status = get_select_options_with_id_separate_key($app_list_strings['user_status_dom'], $app_list_strings['user_status_dom'], $focus->status);
// Groups
$selectGroups = '<option value="new">' . $mod_strings['LBL_CREATE_NEW_GROUP'] . '</option>';
// handle if this I-E is personal or group
$isPersonal = false;
if (!empty($focus->id)) {
$isPersonal = $focus->handleIsPersonal();
}
if ($selects = $focus->getGroupsWithSelectOptions()) {
$selectGroups .= $selects;
}
if ($isPersonal) {
// stomp out standard
$selectGroups = '<option value="' . $focus->group_id . '">' . $focus->getUserNameFromGroupId() . '</option>';
}
// default MAILBOX value
if (empty($focus->mailbox)) {
$mailbox = 'INBOX';
} else {
$mailbox = $focus->mailbox;
}
// service options breakdown
$tls = '';
$notls = '';
$cert = '';
$novalidate_cert = '';
$ssl = '';
if (!empty($focus->service)) {
// will always have 2 values: /tls || /notls and /validate-cert || /novalidate-cert
示例2: getUserNameFromGroupId
public function getUserNameFromGroupId($id)
{
$inboundEmail = new InboundEmail();
//test with a invalid group_id
$inboundEmail->group_id = 2;
$result = $inboundEmail->getUserNameFromGroupId();
$this->assertEquals('', $result);
//test with a valid group_id
$inboundEmail->retrieve($id);
$result = $inboundEmail->getUserNameFromGroupId();
$this->assertEquals('admin', $result);
}