/**
	 * @param int       $userId
	 * @param UserTable $user
	 * @return mixed
	 */
	public function deleteProfile( $userId, $user )
	{
		global $_CB_framework;

		if ( ! $userId ) {
			$userId			=	$user->get( 'id' );
		}

		$profileUrl			=	$_CB_framework->userProfileUrl( $userId, false );

		if ( ! $userId ) {
			$profileUrl		=	'index.php';
		}

		if ( ! $this->getDeleteField( $userId, $user ) ) {
			cbRedirect( $profileUrl, CBTxt::T( 'Not authorized.' ), 'error' );
		}

		cbprivacyClass::getTemplate( 'delete' );

		HTML_privacyDelete::showDelete( $userId, $user, $this );
	}