Well, I managed to get some idea of how the logouthash is made by following the code you posted:
PHP Code:
$user['securitytoken_raw'] = sha1($user['userid'] . sha1($user['salt']) . sha1(COOKIE_SALT));
$user['securitytoken'] = TIMENOW . '-' . sha1(TIMENOW . $user['securitytoken_raw']);
$user['logouthash'] =& $user['securitytoken'];
But now I'm having difficulties reproducing
TIMENOW on Ruby. Could you show me from where this value is retrieved?
And, I still have no clues how to redirect after login / logout, so users could login/logout from outside the forum and return to the same page.
I promess that I'll retribute this favor by posting a
How-to integrate vBulletin with Ruby on Rails. As there is no forum coded with Rails (Ruby), everybody still relies on php solutions like vBulletin, and integrating both would be worthy.