Hi All,
While logging in through webservice api using this url using POST -
I am not getting [login, user] event. I do not get to see this msg in my log file [Debug: customlogin_init called]
Whereas while logging in through web interface I am able to get [login, user] event.
Here is what I have in my plug-in -
function customlogin_init()
{
//log2file: is my msg logging function
log2file("Debug: customlogin_init called \n");
elgg_register_plugin_hook_handler('action', 'login', 'customlogin_setdefaults');
}
function customlogin_setdefaults()
{
log2file("Debug: customlogin_setdefaults \n");
return true;
}
register_elgg_event_handler('login', 'user', 'customlogin_init');
Please suggest if I am doing something wrong.
Thank you all
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Paweł Sroka@srokap
Paweł Sroka - 0 likes
- Raja@raj4linux
Raja - 0 likes
You must log in to post replies.This method returns web services token and doesn't call login, so no event emitted. Only call with the token to user token authenticated web services method will perform login (and it will do it for every request).
Thanks Pawel Sroka.
But my intent is to modify few things in this process of getting auth token.
Is it possible to write a hook that will modify the submitted username/password while requesting auth token?
Thank you all.