Allow API to override login Attribute
This commit is contained in:
parent
f542254403
commit
2c4317f8f2
|
|
@ -84,9 +84,9 @@ class Users extends Controller
|
|||
/**
|
||||
* Add available permission fields to the User form.
|
||||
*/
|
||||
protected function formExtendFields($host)
|
||||
protected function formExtendFields($form)
|
||||
{
|
||||
if ($host->getContext() == 'myaccount')
|
||||
if ($form->getContext() == 'myaccount')
|
||||
return;
|
||||
|
||||
$permissionFields = [];
|
||||
|
|
@ -116,6 +116,6 @@ class Users extends Controller
|
|||
$permissionFields[$fieldName] = $fieldConfig;
|
||||
}
|
||||
|
||||
$host->addTabFields($permissionFields);
|
||||
$form->addTabFields($permissionFields);
|
||||
}
|
||||
}
|
||||
|
|
@ -43,7 +43,10 @@ class User extends UserBase
|
|||
*/
|
||||
protected $purgeable = ['password_confirmation', 'send_invite'];
|
||||
|
||||
protected static $loginAttribute = 'login';
|
||||
/**
|
||||
* @var string Login attribute
|
||||
*/
|
||||
public static $loginAttribute = 'login';
|
||||
|
||||
/**
|
||||
* @return string Returns the user's full name.
|
||||
|
|
|
|||
Loading…
Reference in New Issue