Tag Info

New answers tagged

0

IIS 7 creates "IUSR" as default user to access files via IIS. So make user IUSR has write access to files/folders. How to check if IUSR has read Access? Right Click -> Folder -> Properties -> Security Tab See if IUSR is in Group or user names list, If No. Click Edit -> Add -> Advanced -> Find Now -> Select IUSR and click OK four times Another way is ...


1

If you check user capability before init means there're chances you are the responsible for the setting of the current user object. If you access user after init, then you are sure that something else already setup the user, most the times core itself. This is why accessing user after init is considered safe. In fact, early access may possibly break some ...


1

I'm inclined to think that BuddyPress and bbPress should be checking something else before issuing the _doing_it_wrong message I changed both routines to also check the actual setting of $current_user. global $current_user; if ( is_null( $current_user ) ) { _doing_it_wrong( ... ); } The Notices were no longer displayed. The testing for ...


5

The only prerequisite for current_user_can() is an existing wp_get_current_user(). The latter is defined in pluggable.php, so you can use it after plugins_loaded. The _doing_it_wrong() call you are citing in your question is wrong for itself. My guess is that you took that from BuddyPress or bbPress. Both are running into a recursion if they don't wait that ...



Top 50 recent answers are included