code/Dashboard.php
public function applytoall(SS_HTTPRequest $r) {
		$members = Permission::get_members_by_permission(array("CMS_ACCESS_Dashboard","ADMIN"));
		foreach($members as $member) {
			if($member->ID == Member::currentUserID()) continue;
			
			$member->DashboardPanels()->removeAll();
			foreach(Member::currentUser()->DashboardPanels() as $panel) {
				$clone = $panel->duplicate();					
				$clone->MemberID = $member->ID;
				$clone->write();
			}			
		}
		return new SS_HTTPResponse(_t('Dashboard.APPLYTOALLSUCCESS','Success! This dashboard configuration has been applied to all members who have dashboard access.'));
	}
public function applytoall(SS_HTTPRequest $r) {
		$members = Permission::get_members_by_permission(array("CMS_ACCESS_Dashboard","ADMIN"));
		foreach($members as $member) {
			if($member->ID == Member::currentUserID()) continue;
			
			$member->DashboardPanels()->removeAll();
			foreach(Member::currentUser()->DashboardPanels() as $panel) {
				$clone = $panel->duplicate();					
				$clone->MemberID = $member->ID;
				$clone->write();
			}			
		}
		return new SS_HTTPResponse(_t('Dashboard.APPLYTOALLSUCCESS','Success! This dashboard configuration has been applied to all members who have dashboard access.'));
	}
A controller action that handles the application of a dashboard configuration to all members

@param SS_HTTPRequest The current request
@return SS_HTTPResponse