diff --git a/View/Helper/DisplayUserHelper.php b/View/Helper/DisplayUserHelper.php index 3f9f3e8..63d6f07 100644 --- a/View/Helper/DisplayUserHelper.php +++ b/View/Helper/DisplayUserHelper.php @@ -80,10 +80,6 @@ public function handleLink($user, $attributes = array(), $options = array(), $mo public function handle($user, $attributes = array(), $model = 'TrackableCreator') { $handlename = ''; - if (! Hash::get($user, $model . '.handlename')) { - return ''; - } - if (Hash::get($user, 'ngModel')) { if (Hash::get($attributes, 'avatar')) { $attributes = Hash::remove($attributes, 'avatar'); @@ -91,6 +87,9 @@ public function handle($user, $attributes = array(), $model = 'TrackableCreator' } $handlename .= '{{' . Hash::get($user, 'ngModel') . '.handlename}}'; } else { + if (! Hash::get($user, $model . '.handlename')) { + return ''; + } if (Hash::get($attributes, 'avatar')) { $attributes = Hash::remove($attributes, 'avatar'); $handlename .= $this->avatar($user, Hash::get($attributes, 'avatar'), $model . '.id', true) . ' ';