public function setdefault(SS_HTTPRequest $r) {
		foreach(SiteConfig::current_site_config()->DashboardPanels() as $panel) {
			$panel->delete();
		}
		foreach(Member::currentUser()->DashboardPanels() as $panel) {
			$clone = $panel->duplicate();
			$clone->MemberID = 0;
			$clone->SiteConfigID = SiteConfig::current_site_config()->ID;
			$clone->write();
		}
		return new SS_HTTPResponse(_t('Dashboard.SETASDEFAULTSUCCESS','Success! This dashboard configuration has been set as the default for all new members.'));
	}
public function setdefault(SS_HTTPRequest $r) {
		foreach(SiteConfig::current_site_config()->DashboardPanels() as $panel) {
			$panel->delete();
		}
		foreach(Member::currentUser()->DashboardPanels() as $panel) {
			$clone = $panel->duplicate();
			$clone->MemberID = 0;
			$clone->SiteConfigID = SiteConfig::current_site_config()->ID;
			$clone->write();
		}
		return new SS_HTTPResponse(_t('Dashboard.SETASDEFAULTSUCCESS','Success! This dashboard configuration has been set as the default for all new members.'));
	}
public function setdefault ( SS_HTTPRequest $ r ) { foreach ( SiteConfig :: current_site_config ( ) -> DashboardPanels ( ) as $ panel ) { $ panel -> delete ( ) ; } foreach ( Member :: currentUser ( ) -> DashboardPanels ( ) as $ panel ) { $ clone = $ panel -> duplicate ( ) ; $ clone -> MemberID = 0 ; $ clone -> SiteConfigID = SiteConfig :: current_site_config ( ) -> ID ; $ clone -> write ( ) ; } return new SS_HTTPResponse ( _t ( 'Dashboard.SETASDEFAULTSUCCESS' , 'Success! This dashboard configuration has been set as the default for all new members.' ) ) ; }
A controller action that handles setting the default dashboard configuration

@param SS_HTTPRequest The current request
@return SS_HTTPResponse
A controller action that handles setting the default dashboard configuration