• Resolved UrL

    (@url)


    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

    (@url)

    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

    (@url)

    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.