Code Duplication    Length = 6-8 lines in 2 locations

actions/register.php 1 location

@@ 68-75 (lines=8) @@
65
					login($new_user);
66
					// set forward url
67
					$session = elgg_get_session();
68
					if ($session->has('last_forward_from')) {
69
						$forward_url = $session->get('last_forward_from');
70
						$forward_source = 'last_forward_from';
71
					} else {
72
						// forward to main index page
73
						$forward_url = '';
74
						$forward_source = null;
75
					}
76
					$params = array('user' => $new_user, 'source' => $forward_source);
77
					$forward_url = elgg_trigger_plugin_hook('login:forward', 'user', $params, $forward_url);
78
					forward($forward_url);

mod/simplesaml/lib/events.php 1 location

@@ 62-67 (lines=6) @@
59
	//forward("http://www.google.com");
60
	//change adds session for use with share button
61
	$session = elgg_get_session();
62
	if ($session->has('last_forward_from')) {
63
		$forward_url = $session->get('last_forward_from');
64
		$forward_source = 'last_forward_from';
65
	}else{
66
		$forward_url = elgg_get_site_url();
67
	}
68
	//forward(REFERER);
69
	$obj = elgg_get_entities(array(
70
     	'type' => 'object',