• Hi I am using your wonderfull frontend plugin. Though i ran into a bug. Trying the edit users page, I get the next error message:Fatal error: Call to undefined function wpuf_user_edit_profile_form() in /www/wordpress/websiteswork394/drasorayaeu/wp-content/plugins/wp-user-frontend/wpuf-edit-user.php on line 21

    It is correct, i cant find that function anywhere in the package. Is there a way around?

    This is my most important question, the other one is mentioned before and is about uploading a picture.

    https://www.ads-software.com/extend/plugins/wp-user-frontend/

Viewing 2 replies - 1 through 2 (of 2 total)
  • This one is definitely a bug. I think wpuf_user_edit_profile_form() should be $edit_profile->show_form() in wpuf-editprofile.php.

    To change yourself find the file wpuf-edit-user.php and change the function wpuf_edit_users() to this:

    function wpuf_edit_users() {
        global $edit_profile;
    
        ob_start();
        //if user is logged in
        if ( is_user_logged_in() ) {
    
            //this user can edit the users
            if ( current_user_can( 'edit_users' ) ) {
    
                $action = isset( $_GET['action'] ) ? $_GET['action'] : 'show';
                $user_id = isset( $_GET['user_id'] ) ? intval( $_GET['user_id'] ) : 0;
                $userdata = get_userdata( $user_id );
    
                switch ($action) {
                    case 'edit':
                        //if user exists
                        if ( $user_id && $userdata ) {
                            $edit_profile->show_form( $user_id );
                        } else {
                            printf( __( "User doesn't exists", 'wpuf' ) );
                        }
                        break;
    
                    case 'wpuf_add_user':
                        wpuf_add_user();
                        break;
    
                    default: wpuf_show_users();
                }
            } else { // user don't have any permission
                printf( __( "You don't have permission for this purpose", 'wpuf' ) );
            }
        } else { //user is not logged in
            printf( __( "This page is restricted. Please %s to view this page.", 'wpuf' ), wp_loginout( '', false ) );
        }
    
        return ob_get_clean();
    }
    Thread Starter Mark080959

    (@mark080959)

    Works fine with this, thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error’ is closed to new replies.