I was having this problem today…. while viewing on the iPhone layout, if a user tried to logout they were sent to a blank page with the words “Invalid Token”. I poked around on these forums for a solution, but ended up finding one myself.
After comparing the PHP code for the default (desktop) version of the ja-login code with the mobile version of it, I noticed a discrepancy. After adding the missing code, everything now seems to work.
I admit, this is only a hack, and may not be the best solution from proper-coding standards, but here it is:
1) Go to login.php found at plugins/system/jat3/jat3/base-themes/default/blocks/iphone
Under line 25 insert this code
[PHP]<?php echo JHtml::_(‘form.token’); ?>[/PHP]
Your finished code, from lines 18 to 27, should look like this:
[PHP]
<form action=”<?php echo JRoute::_(‘index.php’, true); ?>” method=”post” id=”login-form”>
<?php echo JText::sprintf( ‘MOD_LOGIN_HINAME’, $user->get(‘name’) ); ?>
<div align=”center”>
<input type=”submit” name=”Submit” class=”button” value=”<?php echo JText::_( ‘JLOGOUT’); ?>” />
</div>
<input type=”hidden” name=”option” value=”com_users” />
<input type=”hidden” name=”task” value=”user.logout” />
<input type=”hidden” name=”return” value=”<?php echo $return; ?>” />
<?php echo JHtml::_(‘form.token’); ?>
</form>
[/PHP]
I welcome any devs or programmers to weigh in on this tip, and verify if it also works for them. So far, it works for me.