Login information

I created new plugin , how to get current user login information, how to get list users and sub user . which file and which function can i handle.Thanks in advance.

Current user’s info in global variable $user_config

User related functions in plugin/core/user/fn.php

Use user_getallwithstatus() to list users by status, 2 is admin, 3 is user, 4 is subusers


When i was planing to get the current login details using session in my own gateway function (fn.php) ,i am not getting any session value,but i able get them in config.php. is there ,what is function , i have to called .i using global variable $user_config getting null value, and i using User functions in plugin/core/user/fn.php user_session_get(); same get null value.

Thanks in advance.


ic, most functions for gateway in fn.php will be executed via daemon script, thus no $user_config available

what function (or hooking which function) exactly were you trying to call ?

fo rexample, in kannel_hook_sendsms() I cannot get $user_config because this function executed from daemon playsmsd


Thanks for replay, As of now, i need get the current logged in user id to use it in my custom plug in file(fn.php). let me know what is function ,i need to use. Thanks in advance.

I told you, there is no function for that if the function is executed from daemon, such as a hook to sendsms()

from plugin report you can use report_whoseonline(), but that function lists whose online, not currently logged in user