Anyone know how you go about getting the currently logged in user?
I'm guessing either through MT::App or MT::Auth but I can't seem to find any documentation at all .... Simple example would be great.
Thanks.
Reported on Movable Type 5
Anyone know how you go about getting the currently logged in user?
I'm guessing either through MT::App or MT::Auth but I can't seem to find any documentation at all .... Simple example would be great.
Thanks.
Reported on Movable Type 5
http://www.movabletype.org/documentation/man/MT/App.html#%24app-%3Euser
sub _my_mode_handler { my $app = shift; my $user = $app->user; }I guess I should have been more clear. I'm not actually writing a plugin per-say, but using MT's system to get the information that I need. My script resides in the mt directory, but has no ties to the system itself.
So for example, I'm getting the recent entries by:
use MT::Bootstrap;
require MT::Entry;
my $entry = MT::Entry->load($entry_id)
where I'm getting the ids from database queries. Is there any similar way to go about getting the current active user? Maybe with cookie/request variables?
What are you trying to do?