You are here

joinSite

-(AlfrescoRequest *) joinSite:(AlfrescoSite *)site completionBlock:(AlfrescoSiteCompletionBlock)completionBlock - Adds the current user as a member of the given site.

If the site is moderated the returned Site object returned will have its isPendingMember flag set to true and isMember flag set to false whereas if the the site is public the isMember flag will be set to true and the isPendingMember flag will be false.

If the current user is already a member of the site or there is a pending join request for the user an exception is thrown with error code 405, if the request fails for any other reason an exception is thrown with error code 406.

Parameters

(AlfrescoSite *) site
The site to be joined.
(AlfrescoSiteCompletionBlock) completionBlock
The block that is called with the updated site on completion of the operation. The block has the format typedef void (^AlfrescoSiteCompletionBlock)(AlfrescoSite *site, NSError *error).

Returns

(AlfrescoRequest *)

Example