Enable login by any attribute - defaults to uid.

Implements #253
This commit is contained in:
2024-01-08 14:54:00 +11:00
parent ef355e8193
commit 74bd996f7a
5 changed files with 31 additions and 4 deletions

13
app/helpers.php Normal file
View File

@@ -0,0 +1,13 @@
<?php
use Illuminate\Support\Arr;
function login_attr_description(): string
{
return Arr::get(config('ldap.login.attr'),login_attr_name());
}
function login_attr_name(): string
{
return key(config('ldap.login.attr'));
}