Fix erorrs for missing data
This commit is contained in:
@@ -46,7 +46,11 @@ class Users_Controller extends WRB_Controller {
|
||||
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($_SESSION['member_id'],$currency='NAIRA'); // $out['current_balance'];
|
||||
$data['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
if (is_array($data['wallet']) && count($data['wallet'])>0 && array_key_exists('current_balance',$data['wallet'][0])) {
|
||||
$data['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
} else {
|
||||
$data['current_balance'] = 0;
|
||||
}
|
||||
|
||||
//$data = $_SESSION['secure_data'];
|
||||
$data['member_id'] = $_SESSION['member_id']; // = $ret->email;
|
||||
@@ -66,7 +70,11 @@ class Users_Controller extends WRB_Controller {
|
||||
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($member_id,$currency='NAIRA'); // $out['current_balance'];
|
||||
$_SESSION['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
if (is_array($data['wallet']) && count($data['wallet'])>0 && array_key_exists('current_balance',$data['wallet'][0])) {
|
||||
$_SESSION['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
} else {
|
||||
$_SESSION['current_balance'] = 0;
|
||||
}
|
||||
|
||||
$_SESSION['active_task'] = $this->account_model->loadActiveTaskCount($member_id);
|
||||
$_SESSION['state'] = $qr[0]['state'];
|
||||
|
||||
@@ -60,8 +60,8 @@ $server_name = 'https://'. $_SERVER['HTTP_HOST'];
|
||||
<!--begin::User-->
|
||||
<div class="aside-user d-flex align-items-sm-center justify-content-center py-5">
|
||||
<!--begin::Symbol-->
|
||||
<div class="symbol symbol-50px">
|
||||
<img src="<? echo $_SESSION['profile_picture']; ?>" alt="" />
|
||||
<div class="symbol symbol-50px"><?php if (array_key_exists('profile_picture', $_SESSION)) { ?>
|
||||
<img src="<? echo $_SESSION['profile_picture']; ?>" alt="" /><?php } ?>
|
||||
</div>
|
||||
<!--end::Symbol-->
|
||||
<!--begin::Wrapper-->
|
||||
|
||||
Reference in New Issue
Block a user