Title: [Plugin:Post From Site] Social Login Problem
Last modified: August 20, 2016

---

# [Plugin:Post From Site] Social Login Problem

 *  Resolved [UrL](https://wordpress.org/support/users/url/)
 * (@url)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/pluginpost-from-site-social-login-problem/)
 * The plugins works correctly for the wordpress users,it can’t handle the $user_id
   when the user connects with wordpress social login.
 * The new id is: get_the_author_ID()
 * How to change that?thanks

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [UrL](https://wordpress.org/support/users/url/)
 * (@url)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/pluginpost-from-site-social-login-problem/#post-2730629)
 * I fixed my problem,just replace the following code to capabilities.php
 * That’s a fix if you are using the plugins [Post-From-Site] with disabled allow_non&&[
   WP-Social-Login].
 *     ```
       function current_user_can( $capability ) {
       	// $current_user = wp_get_current_user();
           $current_user = get_the_author_ID();
       	if ( empty( $current_user ) )
       		return false;
   
       	$args = array_slice( func_get_args(), 1 );
       	$args = array_merge( array( $capability ), $args );
       	return call_user_func_array( array( $current_user, 'has_cap' ), $args );
       }
       ```
   
 *  Thread Starter [UrL](https://wordpress.org/support/users/url/)
 * (@url)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/pluginpost-from-site-social-login-problem/#post-2730634)
 * The previous post returns lot of errors.Don’t use it.
 * The correct solution:
    Go to Plugins Ediot -> post-from-site/post-from-site.class.
   php
 * Change the code from
    `if (current_user_can('publish_posts') || $options['allow_anon']){`
   to `if ( is_user_logged_in() ) {`
 * Facebook/Twiiter users can submit posts now.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin:Post From Site] Social Login Problem’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [UrL](https://wordpress.org/support/users/url/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/pluginpost-from-site-social-login-problem/#post-2730634)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
