Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Commit

Permalink
Merge pull request #47 from archan0621/stage
Browse files Browse the repository at this point in the history
[FIX] 일반 유저 마이페이지 호출 권한 오류 수정
  • Loading branch information
archan0621 authored Feb 9, 2024
2 parents 23073af + 05e0b79 commit 010ec89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tpl/body_tpl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
$_SERVER['REQUEST_URI'] == "/" ? require 'config/config.php' : require 'config/config.php';
$_SERVER['REQUEST_URI'] == "/" ? require 'config/config.php' : require '../config/config.php';
global $_SESSION;
?>
<!DOCTYPE html>
Expand Down
9 changes: 1 addition & 8 deletions view/my_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ function html_body() {
header('Location: /');
}
require $_SERVER['DOCUMENT_ROOT'].'/model/JwtApiCall.php';

$get_member_list = JwtApiCall($my_api."member/memberList", "POST", array(''), $_SESSION['token']);
foreach ($get_member_list['memberList'] as $item) {
if ($item['name'] == $_SESSION['member_id']) {
$memberId = $item['id'];
}
}

$get_member_detail = JwtApiCall($my_api."member/memberDetail", "POST", array('memberId' => $memberId), $_SESSION['token']);
$get_member_detail = JwtApiCall($my_api."member/memberDetail", "POST", array('memberId' => $_SESSION['userId']), $_SESSION['token']);
?>
<div class="page_wrap">
<div class="bg_white page">
Expand Down
1 change: 1 addition & 0 deletions view_control/login_control.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
$_SESSION['token'] = $responseData['token'];
$_SESSION['member_id'] = $get_user_name['message'];
$_SESSION['userRole'] = $get_user_name['userRole'];
$_SESSION['userId'] = $get_user_name['memberId'];
if (isset($_POST['save_login']) && $_POST['save_login']){
$cookie_name = "save_login";
$user_data = array(
Expand Down

0 comments on commit 010ec89

Please sign in to comment.