public function userIsAdmin()
 {
     if (Sessions_helper::currentUser()['admin'] == '1') {
         return true;
     } else {
         return false;
     }
 }
Ejemplo n.º 2
0
<div class="account-page">
	<h1>Hi, <?php 
echo Sessions_helper::currentUser()['first_name'];
?>
</h1>
	<ul>
		<li><a href='<?php 
echo $this->rootPath();
?>
account/orders'>
			<div><?php 
echo $this->image_tag('icons/purchase_history.svg', ['height' => 200]);
?>
<br>Your Orders</div>
		</a></li>
		<li><a href='<?php 
echo $this->rootPath();
?>
wish_lists/show/1'>
			<div><?php 
echo $this->image_tag('icons/wish_list.svg', ['height' => 200]);
?>
<br>Wish Lists</div>
		</a></li>
		<li><a href='<?php 
echo $this->rootPath();
?>
account/paymentmethods'>
			<div><?php 
echo $this->image_tag('icons/payment_methods.svg', ['height' => 200]);
?>