public function initUserPreferenceWithDefault($userLogin, $preferenceName)
    {
        Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);

        $optionValue = $this->getPreferenceValue($userLogin, $preferenceName);

        if ($optionValue === false) {
            $defaultValue = $this->getDefaultUserPreference($preferenceName, $userLogin);

            if ($defaultValue !== false) {
                $this->setUserPreference($userLogin, $preferenceName, $defaultValue);
            }
        }
    }
public function initUserPreferenceWithDefault($userLogin, $preferenceName)
    {
        Piwik::checkUserHasSuperUserAccessOrIsTheUser($userLogin);

        $optionValue = $this->getPreferenceValue($userLogin, $preferenceName);

        if ($optionValue === false) {
            $defaultValue = $this->getDefaultUserPreference($preferenceName, $userLogin);

            if ($defaultValue !== false) {
                $this->setUserPreference($userLogin, $preferenceName, $defaultValue);
            }
        }
    }
public function initUserPreferenceWithDefault ( $ userLogin , $ preferenceName ) { Piwik :: checkUserHasSuperUserAccessOrIsTheUser ( $ userLogin ) ; $ optionValue = $ this -> getPreferenceValue ( $ userLogin , $ preferenceName ) ; if ( $ optionValue === false ) { $ defaultValue = $ this -> getDefaultUserPreference ( $ preferenceName , $ userLogin ) ; if ( $ defaultValue !== false ) { $ this -> setUserPreference ( $ userLogin , $ preferenceName , $ defaultValue ) ; } } }
Sets a user preference in the DB using the preference's default value.
@param string $userLogin
@param string $preferenceName
@ignore
Sets a user preference in the DB using the preference s default value .