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


PHP OpenVBX::getCurrentUser方法代码示例

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


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

示例1: get_greeting

 private function get_greeting()
 {
     $user = OpenVBX::getCurrentUser();
     $voicemail_value = $user->voicemail;
     $json['mode'] = '';
     $json['play'] = '';
     $json['say'] = '';
     if (!empty($voicemail_value)) {
         if (preg_match('/^http/i', $voicemail_value) || preg_match('/^vbx-audio-upload/i', $voicemail_value)) {
             $json['mode'] = 'play';
             $json['play'] = $voicemail_value;
             if (preg_match('/^vbx-audio-upload:\\/\\/(.*)/i', $voicemail_value, $matches)) {
                 // This is a locally hosted file, and we need to return the correct
                 // absolute URL for the file.
                 $json['play'] = real_site_url("audio-uploads/" . $matches[1]);
             }
         } else {
             $json['mode'] = 'say';
             $json['say'] = $voicemail_value;
         }
     }
     $data['json'] = $json;
     if ($this->response_type != 'json') {
         return redirect('voicemail');
     }
     $this->respond('', 'voicemail/greeting', $data);
 }
开发者ID:JeffaCubed,项目名称:OpenVBX,代码行数:27,代码来源:voicemail.php

示例2: getClient

 public function getClient()
 {
     $client = false;
     foreach (OpenVBX::getCurrentUser()->devices as $device) {
         if ('client:' == substr($device->value, 0, strlen('client:'))) {
             $client = $device->value;
             break;
         }
     }
     if (!$client) {
         throw new Exception('could not find client');
     }
     return $client;
 }
开发者ID:HighTechTorres,项目名称:TwilioCookbook,代码行数:14,代码来源:Tester.class.php

示例3: header

<?php

$user = OpenVBX::getCurrentUser();
$tenant_id = $user->values['tenant_id'];
if (isset($_POST['id'])) {
    $flows = OpenVBX::getFlows(array('id' => $_POST['id'], 'tenant_id' => $tenant_id));
    $data = $flows[0]->values['data'];
    $sms_data = $flows[0]->values['sms_data'];
    $export = md5($data . $sms_data) . ':' . base64_encode($data) . ':' . base64_encode($sms_data);
    if (isset($_POST['file'])) {
        header('Content-type: text/plain');
        header('Content-Disposition: attachment; filename=' . preg_replace('/\\W/', '', $flows[0]->values['name']) . '.ovbx');
        echo $export;
        die;
    }
}
$flows = OpenVBX::getFlows(array('tenant_id' => $tenant_id));
?>
<style>
	.vbx-export-flow form {
		margin-top: 20px;
	}
	.vbx-export-flow p {
		margin: 10px 0;
		padding: 0 20px;
	}
	.vbx-export-flow h3 {
		font-size: 14px;
		padding: 0 20px;
		margin-top: 20px;
	}
开发者ID:n4t3,项目名称:OpenVBX-Plugin-Export-4176930374-,代码行数:31,代码来源:export.php

示例4: foreach

			<ul class="user-groups-menu vbx-menu-items-right">
				<li class="menu-item"><button id="button-add-user" class="inline-button add-button"><span>Add User</span></button></li>
				<li class="menu-item"><button id="button-add-group" class="inline-button add-button"><span>Add Group</span></button></li>
			</ul>
		</div><!-- .vbx-content-menu -->
			
		<div class="yui-ge accounts-section">
			<div class="yui-u first">	

				<div id="user-container">
				<h3>Users</h3>
				<p>Drag a user into a group to add them.</p>

				<ul class="user-list">
				<?php 
$admin = OpenVBX::getCurrentUser();
?>
				<?php 
if (isset($users)) {
    $default_avatar = asset_url('assets/i/user-icon.png');
    foreach ($users as $user) {
        ?>
				<li class="user" rel="<?php 
        echo $user->id;
        ?>
">
					<div class="user-utilities">
						<img class="gravatar" src="<?php 
        if ($gravatars) {
            echo gravatar_url($user->email, 30, $default_avatar);
        } else {
开发者ID:ryanlarrabure,项目名称:OpenVBX,代码行数:31,代码来源:accounts.php


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