首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Wordpress + BigBlueButton + Php

Wordpress + BigBlueButton + Php
EN

Stack Overflow用户
提问于 2014-02-23 18:12:34
回答 1查看 775关注 0票数 0

我正在使用BigBlueButton的php api,并试图弄清楚如何获得wordpress用户名,而不是用户在登录时必须输入自己的姓名。如果你们中任何一个优秀的人能帮上忙,我将不胜感激!下面是一些代码:

代码语言:javascript
复制
$step = 3;
    }
    break;
case 'enter':
    /*
     * The user is now attempting to join the meeting
     */

    if (trim($_REQUEST['username'])&& trim($_REQUEST['meetingID'])){
        $bbb_joinURL = BigBlueButton::joinURL($_REQUEST['meetingID'], $_REQUEST['username'],"ap", $salt, $url);
        //$joinURL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?action=join&username='.urlencode($_REQUEST['$current_user']).'&meetingToken='.urlencode($_REQUEST['meetingToken']);

        if (BigBlueButton::isMeetingRunning( $_REQUEST['meetingID'], $url, $salt ))
        {
        ?>
        <script language="javascript" type="text/javascript">
          window.location.href="<?php echo $bbb_joinURL;?>";
        </script>
        <?php
        }
        else
        {
            /*
             * The meeting has not yet started, so check until we get back the status that the meeting is running
             */
            $step = 4;

            $checkMeetingStatus = BigBlueButton::getMeetingInfoURL( $_REQUEST['meetingID'], 'mp', $url, $salt );
        }
    }
    else if (!$_REQUEST['username']){
        $msg = "You must enter your name.";
        $step = 3;
    }
    break;
case 'isMeetingRunning':
    /*
     * This function proxy the request "isMeetingRunning" through PHP Script to BBB Server so we don't have any AJAX security issue
     */
    ob_clean();
    $checkMeetingStatus = BigBlueButton::isMeetingRunningURL( $_REQUEST['meetingID'], $url, $salt );
    echo file_get_contents($checkMeetingStatus);
    die;
    break;
case 'join':
    /*
     * We have an invite request to join an existing meeting and the meeting is running
     * We don't need to pass a meeting description as it's already been set by the first time the meeting was created.
     */
    $bbb_joinURL = BigBlueButton::joinURL($_REQUEST['meetingID'], $_REQUEST['username'],"ap", $salt, $url);
        ?>
EN

回答 1

Stack Overflow用户

发布于 2014-02-23 18:21:41

我不太明白你的问题。但是你可以像这样访问wordpress的用户名

代码语言:javascript
复制
$user_id = get_current_user_id();
if($user_id){
    $user_information = get_userdata($user_id);
    $username = $user_information->user_login;
}
else{
//write you previous code where you ask user to post their name if not logged in 
}

在表$wpdb->users下,列user_login存储用户通过WordPress登录面板在WordPress站点中注册时输入的用户名

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21966900

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档