lib/private/SubAdmin.php
/**
	 * checks if a user is a accessible by a subadmin
	 * @param IUser $subadmin
	 * @param IUser $user
	 * @return bool
	 */
checks if a user is a accessible by a subadmin
@param IUser $subadmin
@param IUser $user
@return bool
checks if a user is a accessible by a subadmin @param IUser $subadmin @param IUser $user @return bool
public function isUserAccessible($subadmin, $user) {
		if(!$this->isSubAdmin($subadmin)) {
			return false;
		}
		if($this->groupManager->isAdmin($user->getUID())) {
			return false;
		}
		$accessibleGroups = $this->getSubAdminsGroups($subadmin);
		foreach($accessibleGroups as $accessibleGroup) {
			if($accessibleGroup->inGroup($user)) {
				return true;
			}
		}
		return false;
	}
public function isUserAccessible ( $ subadmin , $ user ) { if ( ! $ this -> isSubAdmin ( $ subadmin ) ) { return false ; } if ( $ this -> groupManager -> isAdmin ( $ user -> getUID ( ) ) ) { return false ; } $ accessibleGroups = $ this -> getSubAdminsGroups ( $ subadmin ) ; foreach ( $ accessibleGroups as $ accessibleGroup ) { if ( $ accessibleGroup -> inGroup ( $ user ) ) { return true ; } } return false ; }
checks if a user is a accessible by a subadmin
 @param IUser $subadmin
 @param IUser $user
 @return bool
checks if a user is a accessible by a subadmin @param IUser $subadmin @param IUser $user @return bool