Navigation

Search

reattributePosts

Description

Used to re-associate posts to a particular member.

Syntax

int reattributePosts (int $memID[, mixed $emailAddress[, bool $post_count]])



Parameter $memID

Expected type: Integer
Description: The member's current ID



Parameter $emailAddress

Expected type: Mixed
Description: The member's old email address. If not specified, uses the current member's email address

Allowed types for $emailAddress
Allowed values Description
Boolean false (default value) - use the member's current email address
String The member's old email address



Parameter $post_count

Expected type: Boolean
Description: Whether or not to update the members post count. Default is false.



Return value

Expected type: Integer
Description: The number of posts that were re-attributed to the member


Notes

  • Does not check for any permissions.
  • Returns the number of successful reattributed posts.
  • If post_count is set, the member's post count is increased.
View all versions of this function