sc_user_logout macro parameters

how does sc_user_logout(‘usr_login’, ‘admin’, ‘ctrl_login.php’, ‘_self’) work especially the meaning of it parameters because the document is not giving a clear meaning,I wanna log out a user but I don’t know how to do it.

Why don’t you try to play a bit with it and see if you can get it to work.
The documentation example:

sc_user_logout(‘usr_login’, ‘admin’, ‘ctrl_login.php’, ‘_self’);

Seems the first is a variable with the username, the second the name of the user (i.e. the value), the third the application that to be opened afterwards (seems the login procedure). The fourth I am not sure about. Play with it and let us have the fruits of your experience :-).

I do sympathize with you on the inadequate documentation, though :-). One has to be willing to explore.

[QUOTE=Orion;41122]Why don’t you try to play a bit with it and see if you can get it to work.
The documentation example:

sc_user_logout(‘usr_login’, ‘admin’, ‘ctrl_login.php’, ‘_self’);

Seems the first is a variable with the username, the second the name of the user (i.e. the value), the third the application that to be opened afterwards (seems the login procedure). The fourth I am not sure about. Play with it and let us have the fruits of your experience :-).

I do sympathize with you on the inadequate documentation, though :-). One has to be willing to explore.[/QUOTE]

Last param is target. Same page, popup, and so on.

I would be interested in seeing a real example using user ‘admin’.

I’ve played with this for days and am not sure that what I have working actually ‘works’. If I use sc_user_logout by itself, it does’t appear to do anything. If I follow with sc_redir, then it does?

//Remove from logged users
sc_user_logout(‘logged_user’, ‘logout’, ‘sec_Login’, ‘_top’);

//Return to login page (resets all variables)
sc_redir(‘sec_login’,"",’_top’);

The variables that I was worried about clearing are removed by the sec_login application.
http://www.scriptcase.net/forum/showthread.php?10267-Proper-procedure-to-logout&highlight=dynamic

I have the same issue, posted it to support. A workaround may be to empty user global at logout, and check in every application in event at startup if user global has a value, if not exit. Not the best way though.

Instead of this, it’s better to do an apl_status to all applications on logout, it’s the right way to do it.