问题描述
会话ID是“会话”表和另一个表“ temp_sessions”中的主键 注销后,将调用logout.php文件,并执行以下部分。 如何编写SQL查询以匹配主键(在本例中为会话ID),然后将其从另一个SQL表中删除?
*/
public function logout(MyUser $user)
{
$url = $this->getServiceUrl(__FUNCTION__);
try {
$this->logger->debug("SERVICE CALLED | Url: $url");
$response = $this->getClient()->post($url,[
'json' => [
'session_id' => $user->getSessionId(),]
]);
$real_session_id = $request->getSession()->get('_session_id');
$sess_id = $request->getSession()->getId();
// get the session id here and delete a record in the mariadb***
} catch (\Throwable $exception) {
$this->logger->critical("SERVICE EXCEPTION | Url: $url | Exception: " . $exception->getMessage());
throw new ServiceException($exception->getMessage());
}
$content = $response->getBody()->getContents();
$content = json_decode($content,true);
if ('failure' === $content['result']) {
$this->logger->error("SERVICE FAILURE | Url: $url | Message: {$content['message']}");
throw new ServiceException($content['message']);
}
return $content;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)