Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: bobdole2281 - elokuu 16, 2013, 11:47:30 IP

Otsikko: Link to log out possible?
Kirjoitti: bobdole2281 - elokuu 16, 2013, 11:47:30 IP
I tried copy and pasting the link to the logout button but this error shows up:

LainaaAn Error Has Occurred!
Session verification failed. Please try logging out and back in again, and then try again.

It's very possible I messed up the link somehow, but can anyone tell me is making an <a href possible for logging out?
Otsikko: Re: Link to log out possible?
Kirjoitti: Arantor - elokuu 16, 2013, 11:49:45 IP
With some effort, depending on whether you're inside or outside of SMF... so where are you trying to make this happen?
Otsikko: Re: Link to log out possible?
Kirjoitti: NIAB - elokuu 17, 2013, 01:07:27 AP
Basic Logout Link:

<a href="' . $scripturl . '?action=logout;' . $context['session_var'] . '=' . $context['session_id'] . '">
Otsikko: Re: Link to log out possible?
Kirjoitti: Arantor - elokuu 17, 2013, 09:32:35 AP
I didn't want to just quote that because it really depends whether this is inside or outside SMF (e.g. using the API)