mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:29 +01:00
- if we have no RID but a SID, calculate the RID
- if both numeric ids are identical, dont try to change them
This commit is contained in:
parent
7269c8fe77
commit
884224058c
@ -21,6 +21,9 @@ PASSWD=PW
|
||||
CHANGE=
|
||||
while IFS=, read account_lid account_id ad_user SID RID rest
|
||||
do
|
||||
# if we have no RID but a SID, calculate the RID
|
||||
[ -z "$RID" -a -n "$SID" ] && RID=${SID##*-}
|
||||
|
||||
if [ -n "$account_id" -a -n "$RID" ]
|
||||
then
|
||||
[ -z "$account_lid" -o -z "$ad_user" -o "$account_lid" = "$ad_user" ] && {
|
||||
@ -33,8 +36,13 @@ do
|
||||
echo "admin/admin-cli.php --edit-group '$ADMIN,$PASSWD,$account_lid=$ad_user'"
|
||||
RID=-$RID
|
||||
fi
|
||||
[ -n "$CHANGE" ] && CHANGE=$CHANGE,
|
||||
CHANGE=$CHANGE$account_id,$RID
|
||||
|
||||
# if no change necessary, dont
|
||||
if [ $account_id != $RID ]
|
||||
then
|
||||
[ -n "$CHANGE" ] && CHANGE=$CHANGE,
|
||||
CHANGE=$CHANGE$account_id,$RID
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user