Move `get_current_user_id()` call out of if-block, see [25669].

props layotte.
fixes #25372.

git-svn-id: https://develop.svn.wordpress.org/trunk@25689 602fd350-edb4-49c9-b593-d223f7449a82