本文整理汇总了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);