本文整理汇总了PHP中getUserProfile函数的典型用法代码示例。如果您正苦于以下问题:PHP getUserProfile函数的具体用法?PHP getUserProfile怎么用?PHP getUserProfile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getUserProfile函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: actionTest
public function actionTest()
{
/* $user_id = Yii::app()->user->id;
var_dump(Yii::app()->user->isAdmin);
//print_r(User::model()->findByPk($user_id));
echo 'Places='.Place::model()->countUserPlaces($user_id);
echo 'Blocks='.Place::model()->countOwnedBlocks($user_id);
echo 'Estabs='.Place::model()->countOwnedEstablishments($user_id);
yexit();*/
$po = new Pushover();
$po->setToken(Yii::app()->params['pushover']['key']);
$po->setUser(getUserProfile(Yii::app()->user->id)->getAttribute('pushover_token'));
$po->setDevice(getUserProfile(Yii::app()->user->id)->getAttribute('pushover_device'));
$po->setTitle('Hey ' . getFirstName());
$po->setMessage('Hello world! ' . time());
$po->setUrl('http://jeffreifman.com/blog/');
$po->setUrlTitle('cool blog');
$po->setPriority(1);
$po->setTimestamp(time());
$po->setDebug(true);
$go = $po->send();
echo '<pre>';
print_r($go);
echo '</pre>';
}
开发者ID:mafiu,项目名称:listapp,代码行数:25,代码来源:TestController.php
示例2: startSession
<?php
require 'core/sessions.php';
require 'core/functions.php';
include 'includes/head.php';
startSession();
getGetVar();
include 'includes/header.php';
checkGetID($id);
getUserToken($id);
$yourID = $_COOKIE['online'];
checkProfileOwner($id, $yourID);
if ($ownerID == $id) {
getUserProfile($userID);
echo $firstName;
echo '<br>Your Profile';
} else {
getMemberProfile($id);
echo $fname;
if ($signed_in === 1) {
echo '- Online -';
}
}
开发者ID:brandonberger,项目名称:oop,代码行数:23,代码来源:profile.php
示例3: getUserProfile
<?php
include "MonarchPressDb.php";
//test user insert
function getUserProfile($email, $rowID, $url, $user, $pwd, $db)
{
$test = new MonarchPressDb($url, $user, $pwd, $db);
if ($result = $test->search_user_by_email($email)) {
/* fetch object array */
while ($row = $result->fetch_assoc()) {
return $row[$rowID];
}
/* free result set */
$result->close();
}
}
?>
<html>
<body>
<?php
echo "Email: " . getUserProfile('[email protected]', 'email', '128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress') . "<br>";
echo "Username: " . getUserProfile('[email protected]', 'username', '128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress') . "<br>";
echo "Password: " . getUserProfile('[email protected]', 'password', '128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress') . "<br>";
echo "Secret Quetion: " . getUserProfile('[email protected]', 'secret_question', '128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress') . "<br>";
echo "Secret Answer: " . getUserProfile('[email protected]', 'secret_answer', '128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress') . "<br>";
echo "Twitter Username: " . getUserProfile('[email protected]', 'twitter_handle', '128.82.11.37', 'root', 'w@t3rg@t3', 'wordpress') . "<br>";
?>
</body>
</html>
开发者ID:rcodonnell,项目名称:MonarchPress,代码行数:29,代码来源:userProfile.php
示例4: getShopNameById
<div class="row" style="margin-bottom: 1em;">
<div class="col-xs-4">Магазин:</div>
<div class="col-xs-8"><?php
echo getShopNameById($v->shop_id);
?>
</div>
</div>
<div class="row" style="margin-bottom: 1em;">
<div class="col-xs-4">Сотрудник:</div>
<div class="col-xs-8">
<?php
echo getLinkToUserProfile($v->drop_id);
?>
<?php
if ($user['rankname'] == 'admin' || $user['rankname'] == 'labler' || $user['rankname'] == 'support' || $user['rankname'] == 'shipper') {
$dropAddr = getUserProfile($v->drop_id);
if ($dropAddr !== false) {
echo ' | <small>' . $dropAddr->address . ', ' . $dropAddr->state . ' ' . $dropAddr->country . ' ' . $dropAddr->city . ' ' . $dropAddr->zip . '</small>';
}
}
?>
</div>
</div>
<div class="row" style="margin-bottom: 1em;">
<div class="col-xs-4">Отправитель:</div>
<div class="col-xs-8"><?php
echo getLinkToUserProfile($v->shipper_id);
?>
</div>
</div>
开发者ID:g20000,项目名称:mailslight,代码行数:31,代码来源:package.php
示例5: function
$app->post('/api/user', function ($request, $response, $args) {
$params = $request->getParsedBody();
$token = $params["token"];
$name = $params["name"];
$major = $params["major"];
$interests = $params["interests"];
$this->logger->info("POST /api/user");
$this->logger->info("token: " . $token);
$this->logger->info("name: " . $name);
$email = get_email_from_key($this, $token);
$this->logger->info("email: " . $email);
$query = "UPDATE accounts INNER JOIN users ON accounts.id=users.account_id SET name=?, major=?, interests=? WHERE email=?";
$SQLparams = array($name, $major, $interests, $email);
$link = mysqli_connect(HOST, USER, PASSWORD, DATABASE);
$result = mysqli_prepared_query($this, $link, $query, "ssss", $SQLparams);
mysqli_close($link);
$data['name'] = $name;
$data['major'] = $major;
$data['interests'] = $interests;
$data['token'] = $token;
return $response->withHeader('Content-Type', 'application/json')->write(json_encode($data));
});
$app->get('/api/user', function ($request, $response, $args) {
$params = $request->getQueryParams();
$token = $params['token'];
$email = get_email_from_key($this, $token);
$this->logger->info("GET /api/user");
$this->logger->info("email: " . $email);
$data = getUserProfile($this, $email);
return $response->withJson($data);
});
开发者ID:ryanstrat,项目名称:buzz-movies-backend,代码行数:31,代码来源:profile.php
示例6: file_get_contents
<?php
include_once "../database.php";
$json = file_get_contents('php://input');
$request = json_decode($json, true);
$userid = isset($request["userid"]) ? $request["userid"] : "";
echo json_encode(getUserProfile($userid));
开发者ID:phDirectory,项目名称:phdirectory,代码行数:7,代码来源:userprofile.php
示例7: getUserProfile
<?php
include_once "header.php";
include_once "sidebar.php";
$userid = $_GET['uid'];
$data = getUserProfile($userid)[0];
$pos = getUserLatLng($userid)[0];
?>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
Map
</h1>
<ol class="breadcrumb">
<li><a href="dashboard.php"><i class="fa fa-dashboard"></i>Home</a></li>
<li class="active">Here</li>
</ol>
</section>
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script>
var map;
function initMap() {
var latlng = {lat: <?php
echo $pos['lat'];
?>
, lng: <?php
echo $pos['lng'];
开发者ID:dunghand,项目名称:lamansion_2,代码行数:31,代码来源:user_map.php
示例8: function
$app->post('/login', function ($request, $response, $args) {
$params = $request->getParsedBody();
$email = $params["email"];
$password = $params["password"];
$result = login($this, $email, $password);
$isActive = $result["isActive"];
$pwdCorrect = $result["pwdCorrect"];
$name = $result["name"];
if ($isActive && $pwdCorrect) {
$role = get_account_type_from_email($this, $email);
$_SESSION["email"] = $email;
$_SESSION["name"] = $name;
$_SESSION["role"] = $role;
$_SESSION['token'] = get_session_key_from_email($this, $email);
if ($role == "user") {
$profile = getUserProfile($this, $email);
$_SESSION["major"] = $profile["major"];
return $response->withStatus(303)->withHeader('Location', '/recommendation');
} elseif ($role == "admin") {
return $response->withStatus(303)->withHeader('Location', '/admin');
}
}
if (!$isActive && $pwdCorrect) {
$error = "Account is disabled";
} else {
$error = "Username or Password Incorrect";
}
$url = buildInterstitialURL("Back to Login", "/", $error);
return $response->withStatus(303)->withHeader('Location', $url);
});
$app->post('/register', function ($request, $response, $args) {
开发者ID:ryanstrat,项目名称:buzz-movies-backend,代码行数:31,代码来源:app.php
示例9: getUserRankList
}
?>
</tr>
<?php
$usersRanks = getUserRankList(-1, $currentMatchTypeId, -1, -1, 1, 0);
// ARRAY_A | ARRAY_N | OBJECT | OBJECT_K
sort($usersRanks);
foreach ($usersRanks as $user) {
?>
<tr id="poll-5" class="highlight">
<td height="24" align="center"><?php
echo ++$i;
?>
</td>
<td height="24" align="center"><?php
$userprofile = getUserProfile($user->uid);
echo $userprofile[0]->realname;
?>
</td>
<?php
foreach ($rankTypeList as $rankType) {
$userRanks = getUserRankList($user->uid, $currentMatchTypeId, $rankType->id);
echo '<td height="24" align="center">' . $userRanks[0]->value . '</td>';
}
?>
</tr>
<?php
}
?>
</table>
开发者ID:hotmob,项目名称:likedome,代码行数:30,代码来源:rankList.php
示例10: getUserFullName
function getUserFullName($id = 0)
{
$fullname = getUserProfile($id)->getAttribute('first_name') . ' ' . substr(getUserProfile($id)->getAttribute('last_name'), 0, 1) . '.';
$fullname = ucwords($fullname);
return $fullname;
}
开发者ID:mafiu,项目名称:listapp,代码行数:6,代码来源:helpers.php
示例11: unset
unset($dataDecoded['limit']);
}
//if the userHash property is set: query the DB to return the user_id and add that as a property to the dataDecoded array.
if (isset($dataDecoded['userHash'])) {
$userHash = $dataDecoded['userHash'];
$userID = (array) $db->action('SELECT `user_id`', 'users_session', array('hash', '=', $userHash))->first();
$dataDecoded['userID'] = $userID['user_id'];
unset($dataDecoded['userHash']);
}
//This switch statement controls the request's program flow, depending on the defined action property.
switch ($action) {
case 'get':
get($db, $table, $where);
break;
case 'getUserProfile':
getUserProfile($db, $table, $where);
break;
case 'getVisualisationData':
getUserData($db, $dataDecoded);
break;
case 'getLast':
getLast($db, $table, $where);
break;
case 'getMostFrequent':
getMostFrequent($db, $table, $where, $colForCount, $groupBy, $orderBy, $ascOrDesc, $limit);
break;
case 'save':
save($db, $table, $dataDecoded);
break;
case 'confirmIDPassword':
confirmIDPassword($db, $dataDecoded);
开发者ID:pejhmon,项目名称:NHS-nutrition,代码行数:31,代码来源:clientToServerController.php
示例12: getProfile
function getProfile()
{
session_start();
$email = $_SESSION['email'];
$result = getUserProfile($email);
echo json_encode($result);
}
开发者ID:jorgelp94,项目名称:twitterclone,代码行数:7,代码来源:applicationLayer.php
示例13: elseif
} elseif ($id_type == "mobile") {
$sql = "SELECT id FROM `bluenet_v3`.`users` WHERE mobile = '" . $id_number . "'";
$userrow = mysqli_query($db_handle, $sql);
$userrowid = mysqli_fetch_array($userrow);
$userId = $userrowid['id'];
} else {
$searchPram = "";
if ($id_type == "pc") {
$searchPram = " `pan_card_uid` = '" . $id_number . "'";
} else {
if ($id_type == "pv") {
$searchPram = " `pv_uid` = '" . $id_number . "'";
} else {
if ($id_type == "ac") {
$searchPram = " `adhar_card_uid` = '" . $id_number . "'";
} else {
if ($id_type == "vc") {
$searchPram = " `voter_id_uid` = '" . $id_number . "'";
} else {
$searchPram = " `driving_license_uid` = '" . $id_number . "'";
}
}
}
}
$sql = "SELECT user_id as id FROM `bluenet_v3`.`user_documents_uid` WHERE" . $searchPram;
$userrow = mysqli_query($db_handle, $sql);
$userrowid = mysqli_fetch_array($userrow);
$userId = $userrowid['id'];
}
$profile = getUserProfile($db_handle, $userId);
echo "{\"root\":{\"worker\":" . json_encode($profile) . "}}";
开发者ID:rajnishp,项目名称:api_bluenet,代码行数:31,代码来源:search_worker.php
示例14: getCombinedUserActionPermissions
/** To retreive the vtiger_tab acion permissions of the specifed user from the various vtiger_profiles associated with the user
* @param $userid -- The User Id:: Type Integer
* @returns user global permission array in the following format:
* $actionPerrArray=(tabid1=>permission,
* tabid2=>permission);
*/
function getCombinedUserActionPermissions($userId)
{
$log = vglobal('log');
$log->debug("Entering getCombinedUserActionPermissions(" . $userId . ") method ...");
$adb = PearDatabase::getInstance();
$profArr = getUserProfile($userId);
$no_of_profiles = sizeof($profArr);
$actionPerrArr = array();
$actionPerrArr = getProfileAllActionPermission($profArr[0]);
if ($no_of_profiles != 1) {
for ($i = 1; $i < $no_of_profiles; $i++) {
$tempActionPerrArr = getProfileAllActionPermission($profArr[$i]);
foreach ($actionPerrArr as $tabId => $perArr) {
foreach ($perArr as $actionid => $per) {
if ($per == 1) {
$now_permission = $tempActionPerrArr[$tabId][$actionid];
if ($now_permission == 0 && $now_permission != "") {
$actionPerrArr[$tabId][$actionid] = $now_permission;
}
}
}
}
}
}
$log->debug("Exiting getCombinedUserActionPermissions method ...");
return $actionPerrArr;
}
开发者ID:nikdejan,项目名称:YetiForceCRM,代码行数:33,代码来源:UserInfoUtil.php
示例15: CheckPermissions
public function CheckPermissions($actionKey)
{
$current_user = Users_Record_Model::getCurrentUserModel();
$profileid = getUserProfile($current_user->id);
$result = false;
if (isset($this->profilesActions[$actionKey])) {
//$actionid = getActionid($this->profilesActions[$actionKey]);
if (isPermitted('PDFMaker', $this->profilesActions[$actionKey]) == "yes") {
$result = true;
}
}
return $result;
}
开发者ID:Wasage,项目名称:werpa,代码行数:13,代码来源:PDFMaker.php
示例16: createUserPrivilegesfile
/** Creates a file with all the user, user-role,user-profile, user-groups informations
* @param $userid -- user id:: Type integer
* @returns user_privileges_userid file under the user_privileges directory
*/
function createUserPrivilegesfile($userid)
{
global $root_directory;
$handle = @fopen($root_directory . 'user_privileges/user_privileges_' . $userid . '.php', "w+");
if ($handle) {
$newbuf = '';
$newbuf .= "<?php\n\n";
$newbuf .= "\n";
$newbuf .= "//This is the access privilege file\n";
$user_focus = new Users();
$user_focus->retrieve_entity_info($userid, "Users");
$userInfo = array();
$user_focus->column_fields["id"] = '';
$user_focus->id = $userid;
foreach ($user_focus->column_fields as $field => $value_iter) {
$userInfo[$field] = $user_focus->{$field};
}
if ($user_focus->is_admin == 'on') {
$newbuf .= "\$is_admin=true;\n";
$newbuf .= "\n";
$newbuf .= "\$user_info=" . constructSingleStringKeyValueArray($userInfo) . ";\n";
$newbuf .= "\n";
$newbuf .= "?>";
fputs($handle, $newbuf);
fclose($handle);
return;
} else {
$newbuf .= "\$is_admin=false;\n";
$newbuf .= "\n";
$globalPermissionArr = getCombinedUserGlobalPermissions($userid);
$tabsPermissionArr = getCombinedUserTabsPermissions($userid);
//$tabsPermissionArr=getCombinedUserTabsPermissions($userid);
$actionPermissionArr = getCombinedUserActionPermissions($userid);
$user_role = fetchUserRole($userid);
$user_role_info = getRoleInformation($user_role);
$user_role_parent = $user_role_info[$user_role][1];
$userGroupFocus = new GetUserGroups();
$userGroupFocus->getAllUserGroups($userid);
$subRoles = getRoleSubordinates($user_role);
$subRoleAndUsers = getSubordinateRoleAndUsers($user_role);
$def_org_share = getDefaultSharingAction();
$parentRoles = getParentRole($user_role);
$newbuf .= "\$current_user_roles='" . $user_role . "';\n";
$newbuf .= "\n";
$newbuf .= "\$current_user_parent_role_seq='" . $user_role_parent . "';\n";
$newbuf .= "\n";
$newbuf .= "\$current_user_profiles=" . constructSingleArray(getUserProfile($userid)) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$profileGlobalPermission=" . constructArray($globalPermissionArr) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$profileTabsPermission=" . constructArray($tabsPermissionArr) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$profileActionPermission=" . constructTwoDimensionalArray($actionPermissionArr) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$current_user_groups=" . constructSingleArray($userGroupFocus->user_groups) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$subordinate_roles=" . constructSingleCharArray($subRoles) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$parent_roles=" . constructSingleCharArray($parentRoles) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$subordinate_roles_users=" . constructTwoDimensionalCharIntSingleArray($subRoleAndUsers) . ";\n";
$newbuf .= "\n";
$newbuf .= "\$user_info=" . constructSingleStringKeyValueArray($userInfo) . ";\n";
$newbuf .= "?>";
fputs($handle, $newbuf);
fclose($handle);
}
}
}
开发者ID:jmangarret,项目名称:vtigercrm,代码行数:73,代码来源:CreateUserPrivilegeFile.php
示例17: updateUserProfile
function updateUserProfile($userid, $username, $oldpassword, $newpassword, $email, $fullname, $phoneNo)
{
$sql = "";
if ($oldpassword != "" && $newpassword != "") {
$sql = "UPDATE mobile_user SET \n\t\t\tusername='{$username}',\n\t\t\tpassword='{$newpassword}',\n\t\t\temail='{$email}',\n\t\t\tfullname='{$fullname}',\n\t\t\tphoneNo='{$phoneNo}'\n\t\t\tWHERE id='{$userid}' AND password='{$oldpassword}'";
$result = conn()->prepare($sql)->execute();
$profile = getUserProfile($userid);
if ($newpassword != $profile["password"]) {
return false;
}
return $result;
} else {
$sql = "UPDATE mobile_user SET \n\t\t\tusername='{$username}',\n\t\t\temail='{$email}',\n\t\t\tfullname='{$fullname}',\n\t\t\tphoneNo='{$phoneNo}'\n\t\t\tWHERE id='{$userid}'";
$result = conn()->prepare($sql)->execute();
return $result;
}
}
开发者ID:phDirectory,项目名称:phdirectory,代码行数:17,代码来源:database.php
注:本文中的getUserProfile函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论