Merge branch 'master' into the-admin-can-be-reset-password
This commit is contained in:
@ -159,7 +159,7 @@ class SettingsController extends Controller
|
||||
|
||||
public function actionPrivacy()
|
||||
{
|
||||
if (!$this->module->enableGDPRcompliance)
|
||||
if (!$this->module->enableGdprCompliance)
|
||||
throw new NotFoundHttpException();
|
||||
|
||||
return $this->render('privacy', [
|
||||
@ -169,7 +169,7 @@ class SettingsController extends Controller
|
||||
|
||||
public function actionGdprdelete()
|
||||
{
|
||||
if (!$this->module->enableGDPRcompliance)
|
||||
if (!$this->module->enableGdprCompliance)
|
||||
throw new NotFoundHttpException();
|
||||
|
||||
/** @var GdprDeleteForm $form */
|
||||
@ -192,7 +192,7 @@ class SettingsController extends Controller
|
||||
|
||||
/* @var $security SecurityHelper */
|
||||
$security = $this->make(SecurityHelper::class);
|
||||
$anonymReplacement = $this->module->GDPRanonymPrefix . $user->id;
|
||||
$anonymReplacement = $this->module->gdprAnonymizePrefix . $user->id;
|
||||
|
||||
$user->updateAttributes([
|
||||
'email' => $anonymReplacement . "@example.com",
|
||||
@ -260,11 +260,11 @@ class SettingsController extends Controller
|
||||
*/
|
||||
public function actionExport()
|
||||
{
|
||||
if (!$this->module->enableGDPRcompliance)
|
||||
if (!$this->module->enableGdprCompliance)
|
||||
throw new NotFoundHttpException();
|
||||
|
||||
try {
|
||||
$properties = $this->module->GDPRexportProperties;
|
||||
$properties = $this->module->gdprExportProperties;
|
||||
$user = Yii::$app->user->identity;
|
||||
$data = [$properties, []];
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ class RegistrationForm extends Model
|
||||
'compareValue' => true,
|
||||
'message' => Yii::t('usuario', 'Your consent is required to register'),
|
||||
'when' => function () {
|
||||
return $this->module->enableGDPRcompliance;
|
||||
return $this->module->enableGdprCompliance;
|
||||
}]
|
||||
];
|
||||
}
|
||||
@ -106,7 +106,7 @@ class RegistrationForm extends Model
|
||||
'gdpr_consent' => Yii::t('usuario', 'I agree processing of my personal data and the use of cookies to facilitate the operation of this site. For more information read our {privacyPolicy}',
|
||||
[
|
||||
'privacyPolicy' => Html::a(Yii::t('usuario', 'privacy policy'),
|
||||
$this->module->GDPRprivacyPolicyUrl,
|
||||
$this->module->gdprPrivacyPolicyUrl,
|
||||
['target' => '_blank']
|
||||
)
|
||||
])
|
||||
|
||||
@ -164,7 +164,7 @@ class User extends ActiveRecord implements IdentityInterface
|
||||
TimestampBehavior::class,
|
||||
];
|
||||
|
||||
if ($this->module->enableGDPRcompliance) {
|
||||
if ($this->module->enableGdprCompliance) {
|
||||
$behaviors['GDPR'] = [
|
||||
'class' => TimestampBehavior::class,
|
||||
'createdAtAttribute' => 'gdpr_consent_date',
|
||||
|
||||
@ -29,12 +29,12 @@ class Module extends BaseModule
|
||||
* - Forgot me button in profile view.
|
||||
* - Download my data button in profile
|
||||
*/
|
||||
public $enableGDPRcompliance = false;
|
||||
public $enableGdprCompliance = false;
|
||||
/**
|
||||
* @var null|array|string with the url to privacy policy.
|
||||
* Must be in the same format as yii/helpers/Url::to requires.
|
||||
*/
|
||||
public $GDPRprivacyPolicyUrl = null;
|
||||
public $gdprPrivacyPolicyUrl = null;
|
||||
/**
|
||||
* @var array with the name of the user identity properties to be included when user request download of his data.
|
||||
* Names can include relations like `profile.name`.
|
||||
@ -42,7 +42,7 @@ class Module extends BaseModule
|
||||
* > The data subject shall have the right to receive the personal data concerning him or her, which he
|
||||
* > or she has provided to a controller, in a structured, commonly used and machine-readable format
|
||||
*/
|
||||
public $GDPRexportProperties = [
|
||||
public $gdprExportProperties = [
|
||||
'email',
|
||||
'username',
|
||||
'profile.public_email',
|
||||
@ -55,7 +55,7 @@ class Module extends BaseModule
|
||||
/**
|
||||
* @var string prefix to be used as a replacement when user requests deletion of his data.
|
||||
*/
|
||||
public $GDPRanonymPrefix = 'GDPR';
|
||||
public $gdprAnonymizePrefix = 'GDPR';
|
||||
/**
|
||||
* @var bool whether to enable two factor authentication or not
|
||||
*/
|
||||
|
||||
@ -45,7 +45,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= $form->field($model, 'password')->passwordInput() ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($module->enableGDPRcompliance): ?>
|
||||
<?php if ($module->enableGdprCompliance): ?>
|
||||
<?= $form->field($model, 'gdpr_consent')->checkbox(['value' => 1]) ?>
|
||||
<?php endif ?>
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ $networksVisible = count(Yii::$app->authClientCollection->clients) > 0;
|
||||
['label' => Yii::t('usuario', 'Account'), 'url' => ['/user/settings/account']],
|
||||
['label' => Yii::t('usuario', 'Privacy'),
|
||||
'url' => ['/user/settings/privacy'],
|
||||
'visible' => $module->enableGDPRcompliance
|
||||
'visible' => $module->enableGdprCompliance
|
||||
],
|
||||
[
|
||||
'label' => Yii::t('usuario', 'Networks'),
|
||||
|
||||
@ -28,7 +28,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<?= $this->render('/networks/_menu') ?>
|
||||
<?= $this->render('/settings/_menu') ?>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-default">
|
||||
|
||||
Reference in New Issue
Block a user