本文整理汇总了PHP中UserController::getUserProfile方法的典型用法代码示例。如果您正苦于以下问题:PHP UserController::getUserProfile方法的具体用法?PHP UserController::getUserProfile怎么用?PHP UserController::getUserProfile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserController
的用法示例。
在下文中一共展示了UserController::getUserProfile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
if ($response) {
echo JsonResponse::success("Profile Successfully Updated!");
exit;
} else {
echo JsonResponse::error("Could not update Profile. Please try again!");
exit;
}
} else {
echo JsonResponse::error("Profile data not set");
exit;
}
} elseif ($intent == 'getProfile') {
if (isset($_REQUEST['userid'])) {
$userid = $_REQUEST['userid'];
$userController = new UserController();
$profile = $userController->getUserProfile($userid);
if ($profile && is_array($profile)) {
echo JsonResponse::success($profile);
exit;
} else {
echo JsonResponse::error("Could not fetch user profile. Please try again later.");
exit;
}
} else {
echo JsonResponse::error("Expected parameter not set");
exit;
}
} else {
echo JsonResponse::error('Invalid intent!');
exit;
}
示例2: array
<?php
require_once '../_core/global/_require.php';
Crave::requireAll(GLOBAL_VAR);
Crave::requireAll(UTIL);
Crave::requireFiles(MODEL, array('BaseModel', 'UserModel'));
Crave::requireFiles(CONTROLLER, array('AuthenticationController', 'UserController'));
if (!isset($_SESSION[UserAuthTable::userid])) {
header("Location: index.php");
}
$userController = new UserController();
$profile = $userController->getUserProfile($_SESSION[UserAuthTable::userid]);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>PMS</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../css/master.css" rel="stylesheet">
<link href="../css/bootstrap/datepicker.css" rel="stylesheet">