public function clean(array $entry)
	{
		$entry['id'] = $entry['dn'];
		$entry['remember_token'] = $entry['dn'];
		$entry['username'] = $entry['samaccountname'][0];

		// Default user type (ACL: 0 = admin, 1 = user)
		$entry['type'] = 1;
		$entry['group'] = '';

		// Group based view access check
		if(count($this->config['groups']) > 0)
		{
			$entry['type'] = NULL;
		}

		foreach ($this->config['groups'] as $group) 
		{
			$cn = 'CN='.$group.','.$this->config['groupdn'];
			if (isset($entry['dn']) 
				&& $this->checkGroup($entry['dn'], $cn))
			{
				$entry['type'] = 1;
				$entry['group'] = $group;
			}
		}
		
		// Admin Group Check
		foreach ($this->config['admin_groups'] as $group) 
		{
			$cn = 'CN='.$group.','.$this->config['groupdn'];
			if (isset($entry['dn']) 
				&& $this->checkGroup($entry['dn'], $cn))
			{
				$entry['type'] = 0;
				$entry['group'] = $group;
			}
		}

		// Admin/Owner Check (individual user owner/admins)
		foreach ($this->config['owners'] as $owner) 
		{
			if (isset($entry['samaccountname']) 
				&& $entry['samaccountname'][0] == $owner)
			{
				$entry['type'] = 0;
				$entry['group'] = '';
			}
		}

		// If View Groups exist and User is not in group
		if($entry['type'] === NULL)
			return NULL;

		$this->model = new GenericUser( $entry );

		return $this->model;
	}