This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Login account

Anonymous - Tuesday, April 29, 2014 8:40 PM:

Does it has any method or way to detectlogin account?



Brian - Sunday, May 11, 2014 8:39 PM:

Hi tsaylang,

Do you mean is there any way to detect if a particular user logged in?

If yes, then yes.

Under Administration you will find "System Events".

System events can track Failed Login, Successful Login, Logout.

You create a new System event. Then attach a Server Method to run on that event.

You can create more than one server method.

This method tracks successful login and writes a system event log entry.

//Store Last Successful Login Name

Item itm = this.newItem("Variable", "edit");

itm.setAttribute("where", "[variable].name='LastLogin'");

itm.setProperty("value", eventData.LoginName);

itm.apply();

//Create System Events Log

CCO.Utilities.CreateSystemLogRecord("SuccessfulLogin",

"onSuccessfulLogon", eventData.LoginName,

"Login Successful");

return this;

 

Hope this helps,

Brian.



Anonymous - Sunday, May 11, 2014 9:53 PM:

Ok, I'll test it, thanks Brian Pye.