本文整理匯總了PHP中DatabaseHandler::create_activity方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseHandler::create_activity方法的具體用法?PHP DatabaseHandler::create_activity怎麽用?PHP DatabaseHandler::create_activity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DatabaseHandler
的用法示例。
在下文中一共展示了DatabaseHandler::create_activity方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$title = 'Missing required authentication parameters.';
// summary of problem
$detail = 'No password parameter.';
// explanation of problem
$errorMessages[] = array('id' => $id++, 'status' => $status, 'code' => $code, 'title' => $title, 'detail' => $detail);
}
if (!$showStopperError) {
$userId = $db->authenticate_user($_POST['schoolemail'], md5($_POST['password']));
//echo $outcome.' is userId.<br>';
if ($userId) {
$isAuthenticated = true;
//echo $_POST['email'].' is authenticated.<br>';
if ($_POST['operation'] == 'authenticate_user') {
// 2: logged in
$activityType = 2;
$itemId = $db->create_activity($userId, $activityType, $userId);
$profile = array('id' => $userId, 'schoolemail' => $_POST['schoolemail'], 'password' => $_POST['password']);
$data = array('profile' => $profile);
print json_encode($data);
}
} else {
//echo $_POST['email'].' is not authenticated.<br>';
$code = 41;
// Invalid parameter
$title = 'Invalid parameter.';
// summary of problem
$detail = 'Invalid username or password.';
// explanation of problem
$errorMessages[] = array('id' => $id++, 'status' => $status, 'code' => $code, 'title' => $title, 'detail' => $detail);
$errorResponse = array();
$errorResponse['errorResponse'] = array('errors' => $errorMessages);