{"action":"created","issue":{"url":"https://api.github.com/repos/sbrajesh/buddypress-multi-network/issues/4","labels_url":"https://api.github.com/repos/sbrajesh/buddypress-multi-network/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/sbrajesh/buddypress-multi-network/issues/4/comments","events_url":"https://api.github.com/repos/sbrajesh/buddypress-multi-network/issues/4/events","html_url":"https://github.com/sbrajesh/buddypress-multi-network/issues/4","id":24787773,"number":4,"title":"Users are not being displayed on the BuddyPress members page","user":{"login":"desaiuditd","id":2236554,"avatar_url":"https://avatars.githubusercontent.com/u/2236554?v=3","gravatar_id":"","url":"https://api.github.com/users/desaiuditd","html_url":"https://github.com/desaiuditd","followers_url":"https://api.github.com/users/desaiuditd/followers","following_url":"https://api.github.com/users/desaiuditd/following{/other_user}","gists_url":"https://api.github.com/users/desaiuditd/gists{/gist_id}","starred_url":"https://api.github.com/users/desaiuditd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desaiuditd/subscriptions","organizations_url":"https://api.github.com/users/desaiuditd/orgs","repos_url":"https://api.github.com/users/desaiuditd/repos","events_url":"https://api.github.com/users/desaiuditd/events{/privacy}","received_events_url":"https://api.github.com/users/desaiuditd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":23,"created_at":"2013-12-26T13:09:43Z","updated_at":"2015-04-27T19:53:40Z","closed_at":null,"body":"When a user is added to a blog on a multisite environment; that user is not being listed on the members page (front-end) of BuddyPress; though at the admin side, users are displayed correctly.\r\n\r\nI debugged the issue a bit and I came to a conclusion that 'wp_bp_mnetwork_users' table is not being populated correctly after a user is added to a blog.\r\n\r\nI digged up further to find the root cause. I saw 'is_active' column in 'wp_bp_mnetwork_users' table. Take a note that it does not have any default value in the schema and it is 'NOT NULL' field. I scanned the whole code and found that it is not being used in the plugin at all. Can you please explain what is the purpose of introducing 'is_active' field in the schema and not using it anywhere ?\r\n\r\nThe main cause for missing entries is in the add_user function (Class BPNetworkUsers - users.php). There is an insert query which is not passing value for 'is_active' field. Since this field is a NOT NULL field and has no default value it is not allowing us to add entry in the table.\r\n\r\nSo 'is_active' column is causing the issue.\r\nIf it is going to be used in future; then can we set its default value or set it as a NULL field ?\r\nWe can also change the insert query in the add_user function to pass the 'is_active' value explicitly."},"comment":{"url":"https://api.github.com/repos/sbrajesh/buddypress-multi-network/issues/comments/96796213","html_url":"https://github.com/sbrajesh/buddypress-multi-network/issues/4#issuecomment-96796213","issue_url":"https://api.github.com/repos/sbrajesh/buddypress-multi-network/issues/4","id":96796213,"user":{"login":"rahulbachina","id":2507415,"avatar_url":"https://avatars.githubusercontent.com/u/2507415?v=3","gravatar_id":"","url":"https://api.github.com/users/rahulbachina","html_url":"https://github.com/rahulbachina","followers_url":"https://api.github.com/users/rahulbachina/followers","following_url":"https://api.github.com/users/rahulbachina/following{/other_user}","gists_url":"https://api.github.com/users/rahulbachina/gists{/gist_id}","starred_url":"https://api.github.com/users/rahulbachina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahulbachina/subscriptions","organizations_url":"https://api.github.com/users/rahulbachina/orgs","repos_url":"https://api.github.com/users/rahulbachina/repos","events_url":"https://api.github.com/users/rahulbachina/events{/privacy}","received_events_url":"https://api.github.com/users/rahulbachina/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T19:53:40Z","updated_at":"2015-04-27T19:53:40Z","body":"Hi,\r\nI found the Issue causing this\r\nFor some reason the wp_X_bp_tables are not creating when we create Subsites\r\nBecause of this it is unable to Add those feeds or Groups to the tables it is expecting which are not exist for the Subsites.\r\n\r\nI replicated this By Creating all the missing tables for the Subsite in My Case wp_6\r\n\r\nThen started adding the Activity and Groups it is Working fine.\r\n\r\nNow the fix would be adding the bp_   tables for the subsites when we create the Subsite.\r\n\r\nI hope I explained the Issue causing the plugin fail to work.\r\n\r\nPlease let me know if more details required."}}