Code Duplication    Length = 7-7 lines in 3 locations

mod/gcRegistration/actions/register.php 1 location

@@ 136-142 (lines=7) @@
133
		}
134
135
		// if domain doesn't exist in database, check if it's a gc.ca domain
136
		if ($result['num'][0] <= 0) 
137
		{
138
			if ($gcca !== 'gc.ca')
139
				//throw new RegistrationException(elgg_echo('gcRegister:email_error'));
140
				$resulting_error .= '- '.elgg_echo('gcRegister:invalid_email').'<br/>';
141
			
142
		}
143
144
		if (get_input('form_type') !== 'standard')
145
		{

mod/gc_api/lib/profile.php 2 locations

@@ 539-545 (lines=7) @@
536
537
				$resulting_error = "";
538
539
				if ($result['num'][0] <= 0) {
540
					if ($gcca !== 'gc.ca') {
541
						$resulting_error .= elgg_echo('gcRegister:invalid_email');
542
					}
543
				}
544
545
546
				if ($resulting_error !== "") {
547
					$response['error'] = 3;
548
					$response['message'] = 'invalid email or email domain - must be a valid Government of Canada email address';
@@ 786-792 (lines=7) @@
783
				$resulting_error = "";
784
785
				// if domain doesn't exist in database, check if it's a gc.ca domain
786
				if ($result['num'][0] <= 0) {
787
					if ($gcca !== 'gc.ca') {
788
						$resulting_error .= elgg_echo('gcRegister:invalid_email');
789
					}
790
				}
791
792
				if ($resulting_error !== "") {
793
					$response['error'] = 3;
794
					$response['message'] = 'invalid email or email domain - must be a valid Government of Canada email address';
795
					return $response;