Jump to content

Search the Community

Showing results for tags 'isloggedin'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I'm incorporating PW into a Laravel site layout. For the Login/Logout links, I have: <?php if ( !wire('user')->isGuest() && wire('user')->id && wire("user")->isLoggedin() ) { echo '<li><a href="/pages/control/">Admin</li> <li><a href="/pages/control/login/logout/">Logout</li>'; } else echo '<li><a href="/pages/control/login/">Login</li>'; ?> I started with just wire('user')->isLoggedin(), and that didn't seem to work, so searching around the forums added in the other items. Basically, whether I'm logged in or not, I always see a Login link. If I dd/datadump (a Laravel function) the wire('user') I get what looks like the PW user class. So I've included the PW index.php correctly into my Laravel bootstrap/start.php. As an aside, $wire->user->isLoggedIn() doesn't work. It's probably some conflict with Laravel. Switching to use wire('user')->isLoggedIn() let me work, though it gives the wrong result. EDIT 1: It works fine on the pages that are pure PW, just not any that are Laravel driven.
×
×
  • Create New...