Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class Module extends BaseModule
/** @var bool Enable the 'impersonate as another user' function */
public $enableImpersonateUser = true;

/** @var bool Enable gravatar profile avatars */
public $enableGravatar = true;

/** @var int Email changing strategy. */
public $emailChangeStrategy = self::STRATEGY_DEFAULT;

Expand Down
4 changes: 2 additions & 2 deletions views/settings/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@
)
); ?>

<?= $form
<?= ($this->context->module->enableGravatar)? $form
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, use if.
Ternary not necessary here.

->field($model, 'gravatar_email')
->hint(Html::a(Yii::t('user', 'Change your avatar at Gravatar.com'), 'http://gravatar.com')) ?>
->hint(Html::a(Yii::t('user', 'Change your avatar at Gravatar.com'), 'http://gravatar.com')) : null ?>

<?= $form->field($model, 'bio')->textarea() ?>

Expand Down