Edit
app/models/user.php
and add the following line:
var $displayField = 'username';This does not support multiple fields, for example if you wanted to combine
first_name
and last_name
. In order to do this you need to use virtualFields
in your model. Virtual fields allow you to access a created field, but you cannot save it.
Edit
app/models/user.php
and add the following line:
var $virtualFields = array( 'full_name' => "CONCAT(User.first_name, ' ', User.last_name)");then change the display field from
username
to full_name
.
No comments:
Post a Comment