Skip to content

Commit

Permalink
do not override displayField to user model if it is already set
Browse files Browse the repository at this point in the history
  • Loading branch information
maurozadu committed Mar 27, 2014
1 parent 598d0be commit 711ac7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Model/Behavior/BrwUserBehavior.php
Expand Up @@ -4,7 +4,9 @@ class BrwUserBehavior extends ModelBehavior {


public function setup(Model $Model, $config = array()) {
$Model->displayField = 'email';
if (empty($Model->displayField)) {
$Model->displayField = 'email';
}
$Model->validate = $this->_validate($Model);
}

Expand Down

0 comments on commit 711ac7b

Please sign in to comment.