original_string: public function createNewDashboardForUser($login, $dashboardName = '', $addDefaultWidgets = true)
      {
          Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);
  
          $layout = '{}';
  
          if ($addDefaultWidgets) {
              $layout = $this->dashboard->getDefaultLayout();
          }
  
          return $this->model->createNewDashboardForUser($login, $dashboardName, $layout);
      }
code: public function createNewDashboardForUser($login, $dashboardName = '', $addDefaultWidgets = true)
      {
          Piwik::checkUserHasSuperUserAccessOrIsTheUser($login);
  
          $layout = '{}';
  
          if ($addDefaultWidgets) {
              $layout = $this->dashboard->getDefaultLayout();
          }
  
          return $this->model->createNewDashboardForUser($login, $dashboardName, $layout);
      }
code_tokens: public function createNewDashboardForUser ( $ login , $ dashboardName = '' , $ addDefaultWidgets = true ) { Piwik :: checkUserHasSuperUserAccessOrIsTheUser ( $ login ) ; $ layout = '{}' ; if ( $ addDefaultWidgets ) { $ layout = $ this -> dashboard -> getDefaultLayout ( ) ; } return $ this -> model -> createNewDashboardForUser ( $ login , $ dashboardName , $ layout ) ; }
docstring: Creates a new dashboard for the given login
  
  Note: Only a super user is able to create dashboards for other users
  
  @param string $login login of the user that dashboard should be created for
  @param string $dashboardName name of the new dashboard
  @param bool $addDefaultWidgets  whether to add the current default widget collection or not
  @return int|string
docstring_tokens: Creates a new dashboard for the given login