1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 16:26:59 +02:00
This commit is contained in:
Ryan Cramer
2022-11-04 15:34:27 -04:00
parent 3d5561c7af
commit d9bfba5c74

View File

@@ -523,15 +523,14 @@ class User extends Page {
} }
/** /**
* Get the value for a non-native User field * Get value
* *
* @param string $key * @param string $key
* @param string|Selectors|array $selector
* @return null|mixed * @return null|mixed
* *
*/ */
protected function getFieldValue($key, $selector = '') { public function get($key) {
$value = parent::getFieldValue($key, $selector); $value = parent::get($key);
if(!$value && $key === 'language') { if(!$value && $key === 'language') {
$languages = $this->wire()->languages; $languages = $this->wire()->languages;
if($languages) $value = $languages->getDefault(); if($languages) $value = $languages->getDefault();