Hi,
I am having the following situtaion
1.) User registered in into Backendless Server successfully
2.) There is a handler named afterRegister.js which is getting successfully called
3.) Now a property which is a relation to the user object ("example : permissions ") needs to be modified in the server side dynamically
Backendless.ServerCode.User.afterLogin(function(req, res) {
//add your code here
var logger = Backendless.Logging.getLogger( "AfterLogin");
logger.debug(" REQ " + JSON.stringify(req));
logger.debug(new Date() + " - RES - " + JSON.stringify(res));
if (res.result) {
var user = req.context;
user.name = "TANMAY MANDAL";
user.setProperty( "name", "Spidey Man" );
return Backendless.UserService.update(user);
}
Could you please give me a hint how to update the user by the hook.
Thank you very much in advance.
Best Regards
Tanmay