// Public function that deletes a user profile
Public function that deletes a user profile
Public function that deletes a user profile
pub fn delete_profile(owner: &T::AccountId) -> Result<(), Error<T>> {
			// Ensure that only creator of profile can delete it
			Self::profiles(owner).ok_or(<Error<T>>::NoDeletionAuthority)?;
			// Remove profile from storage
			<Profiles<T>>::remove(owner);
			// Reduce profile count
			let new_count = Self::profile_count().saturating_sub(1);
			<ProfileCount<T>>::put(new_count);
			Ok(())
		}
pub fn delete_profile ( owner : & T :: AccountId ) -> Result < ( ) , Error < T > > { // Ensure that only creator of profile can delete it Self :: profiles ( owner ) . ok_or ( < Error < T > > :: NoDeletionAuthority ) ? ; // Remove profile from storage < Profiles < T > > :: remove ( owner ) ; // Reduce profile count let new_count = Self :: profile_count ( ) . saturating_sub ( 1 ) ; < ProfileCount < T > > :: put ( new_count ) ; Ok ( ( ) ) }
Public function that deletes a user profile
Public function that deletes a user profile
owner
&T::AccountId