Don't be afraid of whitespace

This commit is contained in:
Andrew Ruthven 2024-05-01 00:20:07 +12:00
parent 569b20d92f
commit d2a93643bc

View File

@ -485,10 +485,12 @@ function LDAP_check($username, $password ){
if( $ldap_timestamp <= $db_timestamp ) { if( $ldap_timestamp <= $db_timestamp ) {
return $principal; // no need to update return $principal; // no need to update
} }
// we will need to update the user record // we will need to update the user record
dbg_error_log( "LDAP", "user %s has been modified in LDAP, we need to update our DB", $username );
} }
else { else {
dbg_error_log( "LDAP", "user %s doesn't exist in local DB, we need to create it",$username ); dbg_error_log( "LDAP", "user %s doesn't exist in local DB, we need to create it", $username );
} }
$principal->setUsername($username); $principal->setUsername($username);
@ -595,7 +597,7 @@ function sync_LDAP_groups(){
// Groups where nothing was done // Groups where nothing was done
$groups_nothing_done[] = null; $groups_nothing_done[] = null;
if ( sizeof ( $groups_to_create ) ){ if ( sizeof ( $groups_to_create ) ) {
$validUserFields = awl_get_fields('usr'); $validUserFields = awl_get_fields('usr');
foreach ( $groups_to_create as $k => $group ){ foreach ( $groups_to_create as $k => $group ){
@ -662,11 +664,11 @@ function sync_LDAP_groups(){
$groups_to_sync_members[] = $group; $groups_to_sync_members[] = $group;
} }
$c->messages[] = sprintf( i18n('- creating groups : %s'), join(', ',$groups_to_create) ); $c->messages[] = sprintf( i18n('- creating groups : %s'), join(', ', $groups_to_create) );
} }
if ( sizeof ( $groups_to_sync_members ) ){ if ( sizeof ( $groups_to_sync_members ) ){
$c->messages[] = sprintf(i18n('- updating groups : %s'),join(', ',$groups_to_sync_members)); $c->messages[] = sprintf(i18n('- updating groups : %s'), join(', ', $groups_to_sync_members));
// Support the old name of user_mapping_field.. // Support the old name of user_mapping_field..
$user_mapping = NULL; $user_mapping = NULL;