mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
Also update displayname if fullname is changed.
This commit is contained in:
parent
24931e7750
commit
9470f0b9e0
@ -124,7 +124,7 @@ function UpdateUserFromExternal( &$usr ) {
|
||||
}
|
||||
else
|
||||
$type = "INSERT";
|
||||
|
||||
|
||||
$params = array();
|
||||
if ( $type != 'INSERT' ) $params[':user_no'] = $usr->user_no;
|
||||
$qry = new AwlQuery( sql_from_object( $usr, $type, 'usr', 'WHERE user_no= :user_no' ), $params );
|
||||
@ -141,6 +141,12 @@ function UpdateUserFromExternal( &$usr ) {
|
||||
$qry->Exec('Login',__LINE__,__FILE__);
|
||||
CreateHomeCalendar($usr->username);
|
||||
}
|
||||
else if ( $usr->fullname != $old->{'fullname'} ) {
|
||||
// Also update the displayname if the fullname has been updated.
|
||||
$qry->QDo( 'UPDATE principal SET displayname=:new_display WHERE user_no=:user_no',
|
||||
array(':new_display' => $usr->fullname, ':user_no' => $usr->user_no)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user