diff --git a/src/Types/User.php b/src/Types/User.php index 8eb8a177..d77ad8ab 100644 --- a/src/Types/User.php +++ b/src/Types/User.php @@ -23,6 +23,15 @@ function boot() { // $this->addField('status')->type(UsersField::statusEnum())->nonNull(); $volumeId = Craft::$app->getSystemSettings()->getSetting('users', 'photoVolumeId'); + + if (!$volumeId) + { + $uid = Craft::$app->getProjectConfig()->get('users')['photoVolumeUid']; + + if ($uid) + $volumeId = Craft::$app->getVolumes()->getVolumeByUid($uid)->id; + } + if ($volumeId) { $this->addField('photo') ->type($this->request->volumes()->get($volumeId)); @@ -43,4 +52,4 @@ function boot() { } } -} \ No newline at end of file +}