LLMS_Privacy_Erasers::achievement_data( string $email_address, int $page )

Erase student certificate data by email address


Parameters Parameters

$email_address

(string) (Required) email address of the user to retrieve data for

$page

(int) (Required) process page number


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/privacy/class-llms-privacy-erasers.php

	public static function achievement_data( $email_address, $page ) {

		$ret = self::get_return();

		$student = parent::get_student_by_email( $email_address );
		if ( ! $student ) {
			return $ret;
		}

		$messages     = array();
		$achievements = self::get_student_achievements( $student );
		if ( $achievements ) {

			foreach ( $achievements as $achievement ) {
				$messages[] = sprintf( 'Achievement %d deleted.', $achievement->get( 'id' ) );
				$achievement->delete();
			}
		}

		return self::get_return( $messages, true, ( $messages ) );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.