We launched new forums in March 2019—
join us there
.
In a hurry for help with your website?
Get Help Now!
Back to MODX.com
Forums
Docs
Revo Issues
Blog
My Forums
Products
Revo Discussions & Support
Revolution 2.2
Search
getLoginUserID returns blank
119 Posts
[email protected]
Reply #1,
12 years, 4 months ago
With 2.2RC2 I'm getting an empty response for getLoginUserID. getLoginUserName works perfectly.
Bug?
Studio Republic
http://www.studiorepublic.com
0845 226 3205
@christodhunter
24,544 Posts
BobRay
Reply #2,
12 years, 4 months ago
Not a bug but a deprecated function.
The user's ID is available with
$modx->user->get('id');
and you can check login status with something like this:
if ($modx->user->hasSessionContext('web')) { /* user is logged in */ }
Did I help you?
Buy me a beer
Get my Book:
MODX:The Official Guide
MODX info for everyone:
http://bobsguides.com/modx.html
My MODX Extras
Bob's Guides is now hosted at
A2 MODX Hosting
MODX Staff
10,725 Posts
opengeek
Reply #3,
12 years, 4 months ago
They both seem to be working properly for me. Can you be more specific as to what you are doing with it?
Jason Coward
Chief Architect @ MODX
http://www.jasoncoward.com
|
http://twitter.com/drumshaman
|
https://github.com/opengeek