Code Duplication    Length = 7-7 lines in 2 locations

lib/templates/pobject/dialog.grants.users.php 2 locations

@@ 52-58 (lines=7) @@
49
			foreach ($selectedob->data->config->grants as $type => $grant) {
50
				foreach ($grant as $id => $grants) {
51
					if ($type == 'pgroup') {
52
						foreach ($authconfig['groupdirs'] as $groupdir) {
53
							$path  = current($this->find($groupdir, 'login.value=\''.$id.'\'', 'system.get.path.phtml'));
54
							$name  = current($this->find($groupdir, 'login.value=\''.$id.'\'', 'system.get.name.phtml'));
55
							if ($path) {
56
								break;
57
							}
58
						}
59
					} else {
60
						// type is puser;
61
						foreach ($authconfig['userdirs'] as $userdir) {
@@ 61-67 (lines=7) @@
58
						}
59
					} else {
60
						// type is puser;
61
						foreach ($authconfig['userdirs'] as $userdir) {
62
							$path  = current($this->find($userdir, 'login.value=\''.$id.'\'', 'system.get.path.phtml'));
63
							$name  = current($this->find($userdir, 'login.value=\''.$id.'\'', 'system.get.name.phtml'));
64
							if ($path) {
65
								break;
66
							}
67
						}
68
					}
69
70
					$grantsstring = grantsArrayToString($grants);