1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 00:06:55 +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|Selectors|array $selector
* @return null|mixed
*
*/
protected function getFieldValue($key, $selector = '') {
$value = parent::getFieldValue($key, $selector);
public function get($key) {
$value = parent::get($key);
if(!$value && $key === 'language') {
$languages = $this->wire()->languages;
if($languages) $value = $languages->getDefault();