Thread Starter
mavina
(@mavina)
I checked and see that those users who registered using social login by facebook are unable to upload attachments. It gives error and kicks them out. But those who registered using the simple manual signup form, they are able to add attachments.
Hi @mavina-
It sounds like you’ve pretty well solved the problem. The permissions for uploading attachments are handled here: https://github.com/boonebgorges/buddypress-docs/blob/1.9.x/includes/attachments.php#L635
As you can see, what we’re checking for is that the user is a real, logged-in WP user, is adding attachments to a valid doc and has a valid nonce.
Are the users that are logged in via the social login by Facebook logged into real WordPress accounts on your site? It sounds like that plugin might be playing fast and loose with what it means to be logged in. (Nothing in BP Docs causes a user to be logged out, for instance, so that behavior suggests to me that something else is going on.)
Best,
-David
Thread Starter
mavina
(@mavina)
Yes, the Facebook login is very fast and quick but users are able to do everything else on the site and i also see their details such as username, email id, etc on their profile with necessary roles. Only the doc upload feature has this issue. I am not sure if they are logged into real wordpress accounts but i am assuming they are because everything else work, or could it be that social login has a different table or something? I am using Kleo theme and it has its own FB Login feature. What can we do to fix this?
I don’t think Kleo is to blame, since you’ve identified that only Facebook-login users have this problem. To troubleshoot, log in as a normal user, and inspect your browser’s cookies. You should see several cookies that start with wordpress_. Make a note of those cookies. Then, log out and log in as a user using the Facebook login, and check your cookies. If you don’t see the same number and variety of cookies, you’re not fully logged in.
Alternatively, you might try Kleo’s FB login feature and see if users created that way have the same problem.
-David
Thread Starter
mavina
(@mavina)
Thanks for the information, i have done that, i see that when i login using Facebook, then an extra cookie is created named fbsr_243579332789982. So the number of cookies and varieties are not same. Also, the facebook social login feature is a part of kleo theme so not sure what to do now. Yes, users created using Kleo’s FB login are facing the same problem.
Hm. Well, I’m stumped. The BP Docs attachments upload check is very permissive, so maybe the WP media uploader is the source of the restriction. When logged in as a FB user, can you upload media via the media library in wp-admin?
-David