XProfile: Check for activity component before using bp_activity_get().

Currently, the bp_xprofile_updated_profile_activity() function does not
check if the activity component is active before using bp_activity_get().

This can potentially cause a fatal error when updating one's profile.

Fixes #5571 (trunk)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8306 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
BP Nav Menu: If menu URL doesn't exist, mark menu item as invalid.

Previously, when a BuddyPress component is deactivated but a menu item
for this component still exists, the generated menu would create a warning.

This commit addresses this.

Fixes #5545 (trunk)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8308 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Simplify `signups` table install & upgrade routines. See #5563. Props r-a-y. (trunk)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8310 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Remove helper functions for assessing the state of the `wp_signups` table, as they are no longer used in multiple places. Instead, suppress errors and always query for the existence of the table and `signup_id` column before attempting to upgrade or install. See #5563. Props r-a-y. (trunk)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8313 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve the migration tool that converts old non-multisite signups to post-2.0 system

This refactoring involves a number of improvements:

- Old signups are identified as those users with user_status=2, instead of
  those users with an 'activation_key' usermeta value. Use of the latter
  technique caused problems with upgrades when plugins had interfered in the
  normal BuddyPress registration flow in such a way as to retain the activation
  key on activated accounts. user_status=2 is a more reliable technique.
- Querying by user_status=2 means that the get_users() query does not have to
  include all usermeta, which makes for a more performant query on large sites.
- The migration routine has been broken out into a separate function
  bp_members_migrate_signups(), and unit tests have been written for it.
- Activation keys are now regenerated for migrated users who did not have an
  existing key in usermeta for some reason.

Fixes #5553

Props imath

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8315 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Ensure that existing 'description' is not wiped out when running groups_create_group() with an existing group

Fixes #5576

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8316 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improved documentation in Members component. See #5022

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8318 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve inline documentation in Members component. See #5022.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8319 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Update bp_last_activity cache when fetching user last_activity.

The cache doesn't do much when it's not set :)

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8320 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fix incorrect variable reference in last_activity test

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8321 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
xProfile: fix redirect when an admin uploads an avatar to another user's profile.

When cropping a new avatar, a redirect always took you to the logged-in user's profile.
This was fine in most situations, as a user can only update their own profile.
However, site admins are able to edit other users' profiles, so we need to redirect to the displayed user's profile.

Fixes #5580, props milesstewart88

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8322 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't attempt to overload add_root property in bp_core_add_root_component()

The add_root array is defined only for backward compatibility purposes in the
BuddyPress global object, and thus is overloaded rather than defined in the
constructor. This means that adding items directly to the array is forbidden
on recent versions of PHP. As a workaround, we add the item as a separate array
and then swap the array, which is allowed and will not result in notices.

Fixes #5588

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8323 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Check bp_disable_account_deletion() setting in screen function rather than bp_core_delete_account() business function

The purpose of the disable-account-deletion setting is to prevent normal (ie
non-admin) BP users from deleting their own accounts through the front-end
interface. Locating the settings check in the business function
bp_core_delete_account() therefore caused problems when deleting accounts in
areas that were not meant to be covered by the setting, such as when accounts
are deleted in the Dashboard by an admin, or when the BP_Signup::delete()
method is called. This caused a particular problem in BP 2.0, because the
deletion of signups was no longer correctly cleaning up other data from the
database (xprofile, usermeta, etc).

Fixes #5575

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8324 cdf35c40-ae34-48e0-9cc9-0c9da1808c22