Set the $user_id global if it's empty
Merge pull request #90 from joshbetz/master

Set the $user_id global if it's empty

props @joshbetz