Detect session/cookie variable in wordpress to prevent access to documents

It might not be very light solution but it might be much more straightforward approach to load WP core and use current_user_can() and related stuff for determining user permissions.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)