Jump to content

Userinfo->hub


SouthwestVA

Recommended Posts

I have one question here,

Im trying to do this.

<?php
if(!Auth::LoggedIn())
{
   // Show these if they haven't logged in yet
?>
<?php
}
else
{
?>
<p class="front"> Your Hub Manager is...</p>
<?php
if ($userinfo->hub == KDEN)
{
echo "Dimitri";
}
elseif ($userinfo->hub == KLAX)
{
echo "Josh";
}
elseif ($userinfo->hub == KMDW)
{
echo "Jeff ";
}
elseif ($userinfo->hub == KBNA)
{
echo "Mark";
}
else
{
echo "you have no manager yet";
}
?>
<?php
}
?>

but it will always echo you have no manager yet.

does $userinfo->hub echo a number or what?

Please help.

Thanks

Link to comment
Share on other sites

  • Moderators

This will work, give this a go. The Letters needs to be closed in qoutes.

<?php
if(!Auth::LoggedIn())
{
   // Show these if they haven't logged in yet
?>
<?php
}
else
{
?>
<p class="front"> Your Hub Manager is...</p>
<?php
if ($userinfo->hub == 'KDEN')
{
echo "Dimitri";
}
elseif ($userinfo->hub == 'KLAX')
{
echo "Josh";
}
elseif ($userinfo->hub == 'KMDW')
{
echo "Jeff ";
}
elseif ($userinfo->hub == 'KBNA')
{
echo "Mark";
}
else
{
echo "you have no manager yet";
}
?>
<?php
}
?>

Link to comment
Share on other sites

  • Moderators

Try this...

<?php
if(!Auth::LoggedIn())
{
   // Show these if they haven't logged in yet
?>
<?php
}
else
{
?>
<p class="front"> Your Hub Manager is...</p>
<?php
if (Auth::$userinfo->hub == 'KDEN')
{
echo "Dimitri";
}
elseif (Auth::$userinfo->hub == 'KLAX')
{
echo "Josh";
}
elseif (Auth::$userinfo->hub == 'KMDW')
{
echo "Jeff ";
}
elseif (Auth::$userinfo->hub == 'KBNA')
{
echo "Mark";
}
else
{
echo "you have no manager yet";
}
?>
<?php
}
?>

  • Like 1
Link to comment
Share on other sites

Try this...

<?php
if(!Auth::LoggedIn())
{
// Show these if they haven't logged in yet
?>
<?php
}
else
{
?>
<p class="front"> Your Hub Manager is...</p>
<?php
if (Auth::$userinfo->hub == 'KDEN')
{
echo "Dimitri";
}
elseif (Auth::$userinfo->hub == 'KLAX')
{
echo "Josh";
}
elseif (Auth::$userinfo->hub == 'KMDW')
{
echo "Jeff ";
}
elseif (Auth::$userinfo->hub == 'KBNA')
{
echo "Mark";
}
else
{
echo "you have no manager yet";
}
?>
<?php
}
?>

Now i can say, Thanks Alot Kyle! :)

I think it needed auth because i was calling it in Layout.TPL

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...