Added test for Account Object
This commit is contained in:
parent
c1b1485c10
commit
b088de0631
@ -38,6 +38,7 @@ class Menu extends lnApp_Menu {
|
||||
|
||||
$ao = Auth::instance()->get_user();
|
||||
|
||||
if (is_object($ao))
|
||||
foreach ($ao->methods() as $mmo)
|
||||
if ($mmo->menu_display AND $type == $mmo->directory())
|
||||
if (empty($result[$mmo->id]))
|
||||
|
@ -30,7 +30,9 @@ class URL extends lnApp_URL {
|
||||
case 'reseller': $result[$k] = array('name'=>'Reseller','icon'=>'icon-th-list');
|
||||
break;
|
||||
|
||||
case 'user': $result[$k] = array('name'=>Auth::instance()->get_user()->name(),'icon'=>'icon-user');
|
||||
case 'user':
|
||||
if (is_object(Auth::instance()->get_user()))
|
||||
$result[$k] = array('name'=>Auth::instance()->get_user()->name(),'icon'=>'icon-user');
|
||||
break;
|
||||
|
||||
default: $result[$k] = array('name'=>$k,'icon'=>'icon-question-sign');
|
||||
|
@ -77,7 +77,7 @@
|
||||
<li class="">
|
||||
<a href="<?php echo URL::link('admin','welcome',TRUE); ?>"><i class="icon-tasks"></i><span>Admin</span></a>
|
||||
</li>
|
||||
<?php elseif ($ao->isReseller()) : ?>
|
||||
<?php elseif ($ao AND $ao->isReseller()) : ?>
|
||||
<li class="">
|
||||
<a href="<?php echo URL::link('reseller','welcome',TRUE); ?>"><i class="icon-tasks"></i><span>Reseller</span></a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user