Hiya.
I've had a look at the php cookie and it contains a serialised array containing the users id and their hashed password -
so
$user = unserialise( $_COOKIE['phpbb2mysql_data'] );
will give you an array containing
$user[userid] -> 29
$user[autologinid] -> 742929dcb631403d7c1c1cfbd2ca2742
Both of those values can be checked against your phpbb database
$query="SELECT username from phpbb_users where user_id=$user[userid] AND user_password=$user[autologinid]";
Your cookie name and database name might well be different.
And I'm not sure - but you might have to stripslashes from the cookie as I did all this with inspection, and it does have slashes in it.
Good luck!