JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

User Profile Terms of service #230

Closed joomlapl-bot closed 2 years ago

joomlapl-bot commented 2 years ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/38619 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/administrator/language/en-GB/plg_user_profile.ini b/administrator/language/en-GB/plg_user_profile.ini index 9c752b56d7ad..02860f42b395 100644 --- a/administrator/language/en-GB/plg_user_profile.ini +++ b/administrator/language/en-GB/plg_user_profile.ini @@ -22,7 +22,7 @@ PLG_USER_PROFILE_FIELD_PHONE_LABEL="Phone" PLG_USER_PROFILE_FIELD_POSTAL_CODE_LABEL="Postal/ZIP Code" PLG_USER_PROFILE_FIELD_REGION_LABEL="Region" PLG_USER_PROFILE_FIELD_TOS_ARTICLE_LABEL="Select TOS Article" -PLG_USER_PROFILE_FIELD_TOS_DESC_SITE="Please read the Terms of Service. You will not be able to register if you do not agree with them." +PLG_USER_PROFILE_FIELD_TOS_DESC_SITE="Please accept the Terms of Service. You will not be able to register if you do not agree with them." PLG_USER_PROFILE_FIELD_TOS_LABEL="Terms of Service" PLG_USER_PROFILE_FIELD_WEB_SITE_LABEL="Website" PLG_USER_PROFILE_FILL_FIELD_DESC_SITE="If required, please fill this field." diff --git a/plugins/user/profile/profile.php b/plugins/user/profile/profile.php index 5c22722512d9..55cffea7073f 100644 --- a/plugins/user/profile/profile.php +++ b/plugins/user/profile/profile.php @@ -332,11 +332,10 @@ public function onUserBeforeSave($user, $isnew, $data) // Check that the tos is checked if required ie only in registration from frontend. $task = $this->app->input->getCmd('task'); $option = $this->app->input->getCmd('option'); - $tosArticle = $this->params->get('register_tos_article'); $tosEnabled = ($this->params->get('register-require_tos', 0) == 2); // Check that the tos is checked. - if ($task === 'register' && $tosEnabled && $tosArticle && $option === 'com_users' && !$data['profile']['tos']) { + if ($task === 'register' && $tosEnabled && $option === 'com_users' && !$data['profile']['tos']) { throw new InvalidArgumentException(Text::_('PLG_USER_PROFILE_FIELD_TOS_DESC_SITE')); } ```