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


PHP get_user_details函数代码示例

本文整理汇总了PHP中get_user_details函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_details函数的具体用法?PHP get_user_details怎么用?PHP get_user_details使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: addPost

 public function addPost()
 {
     $category = Category::all();
     $details = get_user_details(Auth::user()->id);
     $publisher_test = Publisher::count();
     $publishers = Publisher::orderBy('name', 'ASC')->get();
     return View::make('contributor.addPost')->with('title', "Posts Management")->with('page', "posts")->with('details', $details)->with('publishers', $publishers)->with('publisher_test', $publisher_test)->with('category', $category);
 }
开发者ID:amrutjadhav,项目名称:Laravel_application,代码行数:8,代码来源:ContributorController.php

示例2: addPost

 public function addPost()
 {
     $category = Category::all();
     $details = get_user_details(Auth::user()->id);
     $authors = User::where('is_activated', 1)->get();
     $publisher_test = Publisher::count();
     $publishers = Publisher::orderBy('name', 'ASC')->get();
     return View::make('moderate.addPost')->with('title', "Posts Management")->with('page', "posts")->with('details', $details)->with('category', $category)->with('publishers', $publishers)->with('publisher_test', $publisher_test)->with('authors', $authors);
 }
开发者ID:amrutjadhav,项目名称:Laravel_application,代码行数:9,代码来源:ModerateController.php

示例3: initiate

function initiate()
{
    include ABSPATH . 'applist.php';
    set_connection();
    // Start the Database Connection
    get_user_details();
    // Get the User Record from the DB
    load_applications($all_apps);
    // Load App List for the User
    initiate_email();
}
开发者ID:eellak,项目名称:opengov_adeies,代码行数:11,代码来源:functions.php

示例4: initiate

function initiate()
{
    if (isset($_GET['fetch'])) {
        require_once ABSCPATH . 'modules/citizens/fetch.php';
    }
    //Fetch Initial User Data
    include ABSCPATH . 'applist.php';
    load_applications($all_apps);
    // Load App List for the User
    set_connection();
    // Start the Database Connection
    get_user_details();
    // Get the User Details
    initiate_email();
}
开发者ID:eellak,项目名称:opengov_planodioi,代码行数:15,代码来源:functions.php

示例5: load_profile_page

 private function load_profile_page($file = false)
 {
     if (!$file) {
         return false;
     }
     global $wp_query, $wpdb;
     //$vars['uname'] = FU_USERNAME;
     if ($wp_query->query_vars['username']) {
         //error_log('i should be here.');
         $vars['user'] = get_user_details($wp_query->query_vars['username']);
     } else {
         global $current_user;
         $vars['user'] = $current_user;
     }
     // Something about redirecting if $vars['user'] not set.
     // Votes by user the votes you've made.
     $vars['votes'] = $wpdb->get_results($wpdb->prepare("SELECT \n\t\t\t\tCOUNT(id) AS total_votes,\n\t\t\t\tSUM(rating) AS positive_votes\n\t\t\tFROM {$this->tutable}\n\t\t\tWHERE user_id=%d\n\t\t\tGROUP BY id", $vars['user']->ID));
     // Reputation
     $vars['reputation'] = $this->get_reputation_data($vars['user']->ID);
     // articles submitted
     $vars['posts'] = $this->get_posts_for_user($vars['user']->ID);
     // Activity
     $vars['activity'] = $this->parse_activity($wpdb->get_results($wpdb->prepare("SELECT * FROM " . $this->tables['activity'] . "\n\t\t\tWHERE user_id=%d ORDER BY date DESC LIMIT 30", $vars['user']->ID)));
     $filename = FU_PLUGIN_DIR_PATH . $file;
     if (is_file($filename)) {
         ob_start();
         extract((array) $vars);
         include $filename;
         $contents = ob_get_contents();
         ob_end_clean();
         return $contents;
     }
     return false;
 }
开发者ID:elizabethcb,项目名称:Daily-Globe,代码行数:34,代码来源:front-users-class.php

示例6: json_encode

		<title>Sprint Editor</title>
		
		<link rel="stylesheet" href="editor.css">
		
		<script src="/js/jquery.js"></script>
		<script src="/js/materialize.js"></script>
		<script src="js/knockout.js"></script>
		
		<script>
			var user = {
				name: <?php 
echo json_encode(@$_SESSION['username']);
?>
,
				id: <?php 
echo json_encode(@get_user_details(@$_SESSION['username'])['name']);
?>
			};
		</script>
	</head>
	
	<body>
		<nav data-bind="foreach: nav">
			<a data-bind="text: $data.name, click: $data.click"></a>
		</nav>
		
		<main class="row">
			<div class="col s6">
				username: <span data-bind="text: user.name"></span><br>
				userid: <span data-bind="text: user.id"></span><br>
			</div>
开发者ID:ninjagolloyd,项目名称:Editor,代码行数:31,代码来源:index.php

示例7: switch

 if (isset($_POST['ajax_action'])) {
     switch ($_POST['ajax_action']) {
         // query for all users in
         // the db
         case "get_users":
             get_user_list($user_list);
             $xml = generate_object_list_xml($user_list, "");
             echo $xml;
             break;
             // the caller wishes get details
             // about a user
         // the caller wishes get details
         // about a user
         case "get_user_details":
             $uid = $_POST['ajax_uid'];
             $xml = get_user_details($uid);
             echo $xml;
             break;
             // the caller wishes to update
             // attributes associated with
             // a user
         // the caller wishes to update
         // attributes associated with
         // a user
         case "update_user":
             $uid = $_POST['ajax_uid'];
             $fname = $_POST['ajax_fname'];
             $lname = $_POST['ajax_lname'];
             $email = $_POST['ajax_email'];
             $active = $_POST['ajax_active'];
             $new_passwd = "";
开发者ID:neskie,项目名称:Stewardship-Portal,代码行数:31,代码来源:tng_add_edit_user_code.php

示例8: create_guest_username

         $settings .= 'uc_name["' . $unfocus_chat[$i] . '"] = "' . $db->escape_string(strip_tags($chat['username'])) . '";';
         $settings .= 'uc_status["' . $unfocus_chat[$i] . '"] = "' . $chat['status'] . '";';
         $settings .= 'uc_avatar["' . $unfocus_chat[$i] . '"] = "' . $avatar . '";';
         $settings .= 'uc_link["' . $unfocus_chat[$i] . '"] = "' . $link . '";';
         $double_check[] = $unfocus_chat[$i];
     }
 }
 // Get the logged in user's avatar
 if (check_if_guest($userid)) {
     $user_username = create_guest_username($userid, $guest_name);
     $user_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
     $user_is_guest = 1;
 } else {
     $user_is_guest = 0;
     $user_username = get_username($userid);
     $sql = get_user_details($userid);
     $result = $db->execute($sql);
     if ($result and $db->count_select() > 0) {
         $row = $db->fetch_array($result);
         $user_avatar = $row['avatar'];
         $user_avatar = get_avatar($user_avatar, $userid);
     } else {
         $user_avatar = $base_url . AC_FOLDER_ADMIN . "/images/img-no-avatar.gif";
     }
 }
 $num_mod_reports = 0;
 if ($is_admin == 1) {
     $is_mod = 1;
 }
 if ($is_admin == 1 or $is_mod == 1) {
     $result = $db->execute("\n\t\t\t\tSELECT COUNT(id)\n\t\t\t\tFROM arrowchat_reports\n\t\t\t\tWHERE (working_time < (" . time() . " - 600)\n\t\t\t\t\t\t\tOR working_by = '" . $db->escape_string($userid) . "')\n\t\t\t\t\tAND completed_time = 0\n\t\t\t");
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:external.php

示例9: session_start

require_once '../config.php';
require_once '../Db.php';
require_once '../Banking.php';
require_once '../functions.php';
require_once 'Banklink.php';
session_start();
if (isset($_POST) && empty($_SESSION["authenticated"]) || $_SESSION["authenticated"] != 'true') {
    if (array_key_exists('username', $_POST) && array_key_exists('password', $_POST)) {
        if (login_auth($_POST['username'], $_POST['password'])) {
            $user_details = get_user_details($_POST['username']);
            $_SESSION["authenticated"] = 'true';
            $_SESSION["username"] = $_POST['username'];
            unset($_POST['username']);
            unset($_POST['password']);
            $user_details = get_user_details($_SESSION["username"]);
            $_SESSION['owner_name'] = $user_details['owner_name'];
            $_SESSION['account_number'] = $user_details['account_number'];
            $_SESSION['available_funds'] = $user_details['amount'];
        } else {
            $_SESSION["failed"] = 'true';
            header('Location:login.php');
            exit;
        }
    }
}
if (!empty($_SESSION["authenticated"]) && $_SESSION["authenticated"]) {
    if (array_key_exists('confirm', $_POST)) {
        $transfer = Banking::tranfer($_SESSION['account_number'], $_SESSION['beneficiary_account'], $_SESSION['amount'], $_SESSION['description']);
        if ($transfer === 'Your payment is made') {
            $_SESSION['confirmed'] = $transfer;
开发者ID:kadrim1,项目名称:net_bank,代码行数:30,代码来源:confirmation.php

示例10: while

				<div class="module_content">
					<div class="subtitle">Current Administrators</div>
					<div class="subExplain"><i>Administrators have the same access that moderators have as well as additional options available.</i></div>
					<h2 class="subHeading">Administrators</h2>
					<ol class="scrollable">
<?php 
    $result = $db->execute("\n\t\t\tSELECT arrowchat_status.userid userid\n\t\t\tFROM arrowchat_status\n\t\t\tWHERE arrowchat_status.is_admin = 1\n\t\t\tORDER BY arrowchat_status.userid ASC\n\t\t");
    if ($result and $db->count_select() > 0) {
        while ($row = $db->fetch_array($result)) {
            if (check_if_guest($row['userid'])) {
                $mod_username = create_guest_username($row['userid'], '', true);
                if (empty($mod_username)) {
                    $mod_username = create_guest_username($row['userid'], '', false);
                }
            } else {
                $sql = get_user_details($row['userid']);
                $result2 = $db->execute($sql);
                if ($result2 and $db->count_select() > 0) {
                    $row = $db->fetch_array($result2);
                    $mod_username = $row['username'];
                }
            }
            ?>
						<li class="listItem">
							<a href="users.php?do=view&id=<?php 
            echo $row['userid'];
            ?>
" class="secondaryContent">Edit</a>
							<a href="users.php?do=logs&id=<?php 
            echo $row['userid'];
            ?>
开发者ID:EduardoAugusto2015,项目名称:work2015,代码行数:31,代码来源:pages_users.php

示例11: close_session

    }
    echo "1";
    close_session();
    exit(0);
}
// ####################### START POST SILENCE USER ##########################
if (var_check('chatroom_silence')) {
    $result = $db->execute("\n\t\t\tSELECT is_mod, is_admin \n\t\t\tFROM arrowchat_chatroom_users \n\t\t\tWHERE user_id = '" . $db->escape_string($userid) . "'\n\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tAND (is_admin = '1'\n\t\t\t\t\tOR is_mod = '1')\n\t\t");
    if ($result and $db->count_select() > 0 and is_numeric($chatroom_silence_length)) {
        if (check_if_guest($chatroom_silence)) {
            $silence_username = create_guest_username($chatroom_silence, '', true);
            if (empty($silence_username)) {
                $silence_username = create_guest_username($chatroom_silence, '', false);
            }
        } else {
            $sql = get_user_details($chatroom_silence);
            $result = $db->execute($sql);
            if ($result and $db->count_select() > 0) {
                $row = $db->fetch_array($result);
                $silence_username = $row['username'];
            }
        }
        $silence_message = $silence_username . $language[163] . $db->escape_string(strip_tags(get_username($userid))) . ".";
        $db->execute("\n\t\t\t\tINSERT INTO arrowchat_chatroom_messages (\n\t\t\t\t\tchatroom_id,\n\t\t\t\t\tuser_id,\n\t\t\t\t\tusername,\n\t\t\t\t\tmessage,\n\t\t\t\t\tglobal_message,\n\t\t\t\t\tsent\n\t\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $db->escape_string($chatroom_id) . "', \n\t\t\t\t\t'" . $db->escape_string($userid) . "', \n\t\t\t\t\t'Global',\n\t\t\t\t\t'" . $silence_message . "',\n\t\t\t\t\t'1',\n\t\t\t\t\t'" . time() . "'\n\t\t\t\t)\n\t\t\t");
        if ($push_on == 1) {
            $arrowpush->publish(array('channel' => 'chatroom' . $chatroom_id, 'message' => array('chatroommessage' => array("id" => $db->last_insert_id(), "name" => 'Global', "message" => $silence_message, "userid" => $userid, "sent" => time(), "global" => '1'))));
        }
        // Max silence time is 300 seconds (5 minutes)
        if ($chatroom_silence_length > 300) {
            $chatroom_silence_length = 300;
        }
开发者ID:Lovinity,项目名称:EQM,代码行数:31,代码来源:send_settings.php

示例12: elseif

    $_SESSION['enddate'] = $_POST['enddate'];
} elseif (!isset($_SESSION['enddate'])) {
    $_SESSION['enddate'] = "+7 days";
}
$enddate = $_SESSION['enddate'];
##########################
$athlete_id = $_SESSION['athlete_id'];
// Check whether the user is requesting to view a different athlete's log
// and check whether he has permission.  Some functions request this
// via GET, others by POST so check both. POST gets priority.
if (isset($_POST['athlete_id']) && check_share_permission($_POST['athlete_id'], "view log {$athlete_id}")) {
    $athlete_id = $_POST['athlete_id'];
} elseif (isset($_GET['shareid']) && check_share_permission($_GET['shareid'], "view log {$athlete_id}")) {
    $athlete_id = $_GET['shareid'];
}
$athlete_details = get_user_details($athlete_id);
########################
# Display HTML headers
########################
include_once "log_display_functions.php";
include_once "validation/validate_date.php";
include_once "menubar.php";
// Only send the IE Quirks mode header if this is ie, else hidden stuff will not reveal in FFox
$browser = $_SERVER['HTTP_USER_AGENT'];
if (preg_match("/MSIE/", $browser)) {
    echo <<<ENDHTML
    <!-- Internet Explorer has to be in quirks mode, this comment just does that -->
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

ENDHTML;
}
开发者ID:robincj,项目名称:tlog,代码行数:31,代码来源:view_log.php

示例13: display_subscriptions_list

/**
 * This display the list of subscriptions of user.
 * Uses "subscriptions/user.html" for output.
 * 
 * Following things are assigned:
 * {$classes} - List classes
 * {$attributes} - List attributes
 * 
 * @author Fawaz Tahir <fawaz.cb@gmail.com>
 * @global object $userquery
 * @param int $userid
 * @return string
 */
function display_subscriptions_list($userid = null)
{
    global $userquery;
    if (is_null($userid)) {
        $userid = $userquery->udetails ? $userquery->udetails : userid();
    }
    if ($userid) {
        if (is_numeric($userid)) {
            $user = get_user_details($userid);
        } else {
            $user = $userid;
        }
    }
    if (!$user) {
        return false;
    }
    if (!has_subscriptions($user)) {
        return false;
    }
    $subscriptions = get_user_subscriptions($userid);
    if ($subscriptions) {
        end($subscriptions);
        $last_index = key($subscriptions);
        reset($subscriptions);
        $first_index = key($subscriptions);
        foreach ($subscriptions as $key => $subscription) {
            $params['file'] = 'subscriptions/user.html';
            $params['user'] = $subscription;
            $params['classes'] = 'subscription-user' . ($key == $first_index ? " subscription-user-first" : "") . ($key == $last_index ? " subscription-user-last" : "");
            $params['attributes'] = ' data-subscription-id="' . $subscription['subscription_id'] . '" data-userid="' . $subscription['subscribed_to'] . '" ';
            if (is_active_subscription($subscription)) {
                $params['classes'] .= " active active-subscription ";
            }
            $output .= fetch_template_file($params);
        }
        return $output;
    } else {
        return false;
    }
}
开发者ID:yukisky,项目名称:clipbucket,代码行数:53,代码来源:functions_subscriptions.php

示例14: add_feed

 /**
  * 
  * @global type $cbgroup
  * @param type $array
  * @return type 
  */
 function add_feed($array)
 {
     global $userquery;
     $group_id = $array['group_id'];
     if (!$group_id) {
         return false;
     }
     $group = $array['group'];
     if (!$group) {
         $group = $this->get_group_details($group_id);
     }
     if (!$group) {
         return false;
     }
     $userid = $array['userid'];
     if (!$userid) {
         if (userid()) {
             $userid = userid();
             $user = $userquery->udetails;
         }
     }
     if (!$userid) {
         return false;
     }
     if (!$user) {
         $user = $array['user'];
     }
     if (!$user) {
         $user = get_user_details($user);
     }
     if (!$user) {
         return false;
     }
     if ($array['message']) {
         $message = apply_filters($array['message'], 'feed_message');
     }
     if ($array['type']) {
         $type = $array['type'];
     } else {
         $type = 'message';
     }
     $content_id = '';
     $content = '';
     $content_type = '';
     if ($array['content_id']) {
         $content_id = $array['content_id'];
         $content = $array['content'];
         $content_type = $array['content_type'];
     }
     $action = $array['action'];
     if ($array['icon']) {
         $icon = $array['icon'];
     } else {
         $icon = '';
     }
     if ($array['action_group_id']) {
         $action_group_id = $array['action_group_id'];
     }
     $array = array('message' => $message, 'message_attributes' => array(), 'userid' => userid(), 'user' => $userquery->udetails, 'content_id' => $content_id, 'content' => $content, 'content_type' => $content_type, 'object_id' => $group_id, 'object' => $group, 'object_type' => 'group', 'action_group_id' => $action_group_id, 'action' => $action, 'icon' => $icon);
     global $cbfeeds;
     $cbfeeds->add_feed($array);
 }
开发者ID:yukisky,项目名称:clipbucket,代码行数:68,代码来源:groups.class.php

示例15: close_session

}
// ################### START POST REMOVE MODERATOR #######################
if (var_check('chatroom_remove_mod')) {
    $result = $db->execute("\n\t\t\tSELECT is_mod, is_admin \n\t\t\tFROM arrowchat_chatroom_users \n\t\t\tWHERE user_id = '" . $db->escape_string($userid) . "'\n\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tAND (is_admin = '1'\n\t\t\t\t\tOR is_mod = '1')\n\t\t");
    if ($result and $db->count_select() > 0) {
        $db->execute("\n\t\t\t\tUPDATE arrowchat_chatroom_users \n\t\t\t\tSET is_mod = '0' \n\t\t\t\tWHERE user_id = '" . $db->escape_string($chatroom_remove_mod) . "'\n\t\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t");
    }
    echo "1";
    close_session();
    exit(0);
}
// ####################### START POST BAN USER ##########################
if (var_check('chatroom_ban')) {
    $result = $db->execute("\n\t\t\tSELECT is_mod, is_admin \n\t\t\tFROM arrowchat_chatroom_users \n\t\t\tWHERE user_id = '" . $db->escape_string($userid) . "'\n\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t\tAND (is_admin = '1'\n\t\t\t\t\tOR is_mod = '1')\n\t\t");
    if ($result and $db->count_select() > 0) {
        $sql = get_user_details($chatroom_ban);
        $result = $db->execute($sql);
        if ($result and $db->count_select() > 0) {
            $row = $db->fetch_array($result);
            $ban_username = $row['username'];
        }
        $ban_message = $ban_username . $language[107] . $db->escape_string(strip_tags(get_username($userid))) . ".";
        $db->execute("\n\t\t\t\tINSERT INTO arrowchat_chatroom_messages (\n\t\t\t\t\tchatroom_id,\n\t\t\t\t\tuser_id,\n\t\t\t\t\tusername,\n\t\t\t\t\tmessage,\n\t\t\t\t\tglobal_message,\n\t\t\t\t\tsent\n\t\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $db->escape_string($chatroom_id) . "', \n\t\t\t\t\t'" . $db->escape_string($userid) . "', \n\t\t\t\t\t'Global',\n\t\t\t\t\t'" . $ban_message . "',\n\t\t\t\t\t'1',\n\t\t\t\t\t'" . time() . "'\n\t\t\t\t)\n\t\t\t");
        if ($push_on == 1) {
            $pubnub->publish(array('channel' => 'chatroom' . $chatroom_id, 'message' => array('chatroommessage' => array("id" => $db->last_insert_id(), "name" => 'Global', "message" => $ban_message, "userid" => $userid, "sent" => time(), "global" => '1'))));
        }
        $db->execute("\n\t\t\t\tINSERT INTO arrowchat_chatroom_banlist (\n\t\t\t\t\tuser_id, \n\t\t\t\t\tchatroom_id, \n\t\t\t\t\tban_length, \n\t\t\t\t\tban_time\n\t\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'" . $db->escape_string($chatroom_ban) . "',\n\t\t\t\t\t'" . $db->escape_string($chatroom_id) . "',\n\t\t\t\t\t'" . $db->escape_string($chatroom_ban_length) . "',\n\t\t\t\t\t'" . time() . "'\n\t\t\t\t) \n\t\t\t\tON DUPLICATE KEY \n\t\t\t\t\tUPDATE ban_length = '" . $db->escape_string($chatroom_ban_length) . "', ban_time = '" . time() . "'\n\t\t\t");
        $db->execute("\n\t\t\t\tUPDATE arrowchat_chatroom_users \n\t\t\t\tSET session_time = '0'\n\t\t\t\tWHERE user_id = '" . $db->escape_string($chatroom_ban) . "'\n\t\t\t\t\tAND chatroom_id = '" . $db->escape_string($chatroom_id) . "'\n\t\t\t");
    }
    echo "1";
    close_session();
开发者ID:Sywooch,项目名称:forums,代码行数:31,代码来源:send_settings.php


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