Welcome Guest, Not a member yet? Register   Sign In

@MGatner Very kind of you - thanks! I'll take a look asap.

@MGatner I had a quick look & tried a login which was fine. Before I install the playground (and this is probably a bit lazy I know) I see you have a logout link. How is logout implemented? I couldn't see anything in Myth:Auth docs & haven't figured it out yet Blush . Just to be clear you need to create a new, empty database before step 4 of Getting Started in README.md? Thanks!

The logout is a method in the AuthController, there is also a route for it so you should be able to
just do this:

PHP Code:
<?= route_to('logout');?>

// or in code as long as your Controller extends the AuthController.


Hope that helps.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

@InsiteFX Thank you! Obviously missed that. Works fine. Hadn't seen route_to before either (or it hadn't sunk in). Learning all the time. Cheers.

Hey guys,

I'm really happy with using Myth-auth so far, many thanks to all contributors Smile

However, lately I'm wondering if it is possible to view the website from the perspective of other users?
E.g., when I'm logged in as a superadmin, it would be convenient to navigate the website from the perspective of a "basic" user (where certain modules, buttons, etc. are hidden).

Is there a possibility to do this or maybe implement this? I think a convenient place for this might be a selection option in the toolbar or such.


You can always ask for a feature to add request from Lonnie he may add it for you.

@ jim1001
If you take a look at the ./system/Common.php file you will find all most all of the helpers
for the core there.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Adding a feature request was the eventual intend, but I first wanted to check here if I'm overseeing this functionality or if this is a no-go for the plugin before requesting at github :-)

@aschmitz I use this a lot, and call it “impersonation”. I don’t know that it needs to be a part of the library, you can accomplish it very easily with a controller that changes the session variable or calls the service methods. I usually just log out when I am done and log back in as “me” but I suppose some library version could maintain superadmin status despite impersonating another user?

@MGatner, great naming, I will have to steal that Smile
The idea sounds nice, right now I'm always logging out as SA and back in a someone else but have to remember the passwords for that. Using myth-auths methods from a controller seems much easier. I will try that and try to keep track in the session whether I'm really the current user or just impersonating, thanks!
I thought it might be nice to have that functionality bundled in the debugbar, however this would kind of upgrade it from a debug bar to an action bar.

Hi there.
Loving CI4 and Myth-Auth so far.. still learning though.

I'm trying to display the username in my sites top-bar. Is there a way to get the username (and other user info also) so it can be used in View files?

I tried the user() helper, but it returns an object with protected "attributes" property I can't access from within views. Maybe I'm missing some fundamental thing, again.. still learning Smile

Theme © iAndrew 2016 - Forum software by © MyBB