samdb: add fullname_from_names() method
commit899e66d47ff08a299cb12b33b987e7f98692a3b8
authorJule Anger <ja@sernet.de>
Mon, 24 Aug 2020 14:39:01 +0000 (24 16:39 +0200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 1 Oct 2020 01:18:39 +0000 (1 01:18 +0000)
tree9ece595bdfdd730c64280f2a6bd6fde864f3faca
parenta22a80ed6e8494b3edb717c3b288c7adde5092ee
samdb: add fullname_from_names() method

Add a method to construct the fullname, using the given name, the initials
and the surname.
If one of this values is empty, try to use the old one, given by an
attributs set.
If the combination is empty, the method will return the fallback-default
parameter.

Use this method to construct the CN or the displayName of users or
contacts.

Signed-off-by: Jule Anger <ja@sernet.de>
Reviewed-by: Björn Baumbach <bb@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/samdb.py