Index: /trunk/src/includes/replies/functions.php
===================================================================
--- /trunk/src/includes/replies/functions.php	(revision 7165)
+++ /trunk/src/includes/replies/functions.php	(revision 7166)
@@ -731,8 +731,4 @@
 		/** Revisions *********************************************************/
 
-		// Update locks
-		update_post_meta( $reply_id, '_edit_last', bbp_get_current_user_id() );
-		delete_post_meta( $reply_id, '_edit_lock' );
-
 		// Revision Reason
 		if ( ! empty( $_POST['bbp_reply_edit_reason'] ) ) {
@@ -802,4 +798,7 @@
 	$reply_to = bbp_validate_reply_to( $reply_to, $reply_id );
 
+	// Get the current user ID
+	$user_id  = bbp_get_current_user_id();
+
 	// Bail if there is no reply
 	if ( empty( $reply_id ) ) {
@@ -807,18 +806,27 @@
 	}
 
-	// Check author_id
+	// Check author_id, fallback to current user ID
 	if ( empty( $author_id ) ) {
-		$author_id = bbp_get_current_user_id();
-	}
-
-	// Check topic_id
+		$author_id = $user_id;
+	}
+
+	// Check topic_id, fallback to post_parent or meta
 	if ( empty( $topic_id ) ) {
 		$topic_id = bbp_get_reply_topic_id( $reply_id );
 	}
 
-	// Check forum_id
+	// Check forum_id, fallback to post_parent or meta
 	if ( ! empty( $topic_id ) && empty( $forum_id ) ) {
 		$forum_id = bbp_get_topic_forum_id( $topic_id );
 	}
+
+	// Update locks
+	update_post_meta( $reply_id, '_edit_last', $user_id );
+	delete_post_meta( $reply_id, '_edit_lock' );
+
+	// Forum/Topic meta (early, for use in downstream functions)
+	bbp_update_reply_forum_id( $reply_id, $forum_id );
+	bbp_update_reply_topic_id( $reply_id, $topic_id );
+	bbp_update_reply_to      ( $reply_id, $reply_to );
 
 	// If anonymous post, store name, email, website and ip in post_meta.
@@ -854,9 +862,4 @@
 		}
 	}
-
-	// Reply meta relating to reply position in tree
-	bbp_update_reply_forum_id( $reply_id, $forum_id );
-	bbp_update_reply_topic_id( $reply_id, $topic_id );
-	bbp_update_reply_to      ( $reply_id, $reply_to );
 
 	// Update associated topic values if this is a new reply
Index: /trunk/src/includes/topics/functions.php
===================================================================
--- /trunk/src/includes/topics/functions.php	(revision 7165)
+++ /trunk/src/includes/topics/functions.php	(revision 7166)
@@ -651,8 +651,4 @@
 		/** Revisions *********************************************************/
 
-		// Update locks
-		update_post_meta( $topic_id, '_edit_last', bbp_get_current_user_id() );
-		delete_post_meta( $topic_id, '_edit_lock' );
-
 		// Revision Reason
 		if ( ! empty( $_POST['bbp_topic_edit_reason'] ) ) {
@@ -735,4 +731,7 @@
 	$forum_id = bbp_get_forum_id( $forum_id );
 
+	// Get the current user ID
+	$user_id  = bbp_get_current_user_id();
+
 	// Bail if there is no topic
 	if ( empty( $topic_id ) ) {
@@ -740,12 +739,54 @@
 	}
 
-	// Check author_id
+	// Check author_id, fallback to current user ID
 	if ( empty( $author_id ) ) {
-		$author_id = bbp_get_current_user_id();
-	}
+		$author_id = $user_id;
+	}
+
+	// Check forum_id, fallback to post_parent or meta
+	if ( empty( $forum_id ) ) {
+		$forum_id = bbp_get_topic_forum_id( $topic_id );
+	}
+
+	// Update locks
+	update_post_meta( $topic_id, '_edit_last', $user_id );
+	delete_post_meta( $topic_id, '_edit_lock' );
 
 	// Forum/Topic meta (early, for use in downstream functions)
 	bbp_update_topic_forum_id( $topic_id, $forum_id );
 	bbp_update_topic_topic_id( $topic_id, $topic_id );
+
+	// If anonymous post, store name, email, website and ip in post_meta.
+	if ( ! empty( $anonymous_data ) ) {
+
+		// Update anonymous meta data (not cookies)
+		bbp_update_anonymous_post_author( $topic_id, $anonymous_data, bbp_get_topic_post_type() );
+
+		// Set transient for throttle check (only on new, not edit)
+		if ( empty( $is_edit ) ) {
+			set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time(), HOUR_IN_SECONDS );
+		}
+	}
+
+	// Handle Subscription Checkbox
+	if ( bbp_is_subscriptions_active() && ! empty( $author_id ) ) {
+
+		// Check if subscribed
+		$subscribed = bbp_is_user_subscribed( $author_id, $topic_id );
+
+		// Check for action
+		$subscheck  = ( ! empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) )
+			? true
+			: false;
+
+		// Subscribed and unsubscribing
+		if ( ( true === $subscribed ) && ( false === $subscheck ) ) {
+			bbp_remove_user_subscription( $author_id, $topic_id );
+
+		// Not subscribed and subscribing
+		} elseif ( ( false === $subscribed ) && ( true === $subscheck ) ) {
+			bbp_add_user_subscription( $author_id, $topic_id );
+		}
+	}
 
 	// Get the topic types
@@ -777,37 +818,4 @@
 					break;
 			}
-		}
-	}
-
-	// If anonymous post, store name, email, website and ip in post_meta.
-	if ( ! empty( $anonymous_data ) ) {
-
-		// Update anonymous meta data (not cookies)
-		bbp_update_anonymous_post_author( $topic_id, $anonymous_data, bbp_get_topic_post_type() );
-
-		// Set transient for throttle check (only on new, not edit)
-		if ( empty( $is_edit ) ) {
-			set_transient( '_bbp_' . bbp_current_author_ip() . '_last_posted', time(), HOUR_IN_SECONDS );
-		}
-	}
-
-	// Handle Subscription Checkbox
-	if ( bbp_is_subscriptions_active() && ! empty( $author_id ) ) {
-
-		// Check if subscribed
-		$subscribed = bbp_is_user_subscribed( $author_id, $topic_id );
-
-		// Check for action
-		$subscheck  = ( ! empty( $_POST['bbp_topic_subscription'] ) && ( 'bbp_subscribe' === $_POST['bbp_topic_subscription'] ) )
-			? true
-			: false;
-
-		// Subscribed and unsubscribing
-		if ( ( true === $subscribed ) && ( false === $subscheck ) ) {
-			bbp_remove_user_subscription( $author_id, $topic_id );
-
-		// Not subscribed and subscribing
-		} elseif ( ( false === $subscribed ) && ( true === $subscheck ) ) {
-			bbp_add_user_subscription( $author_id, $topic_id );
 		}
 	}
