i don't think u can assume the "groups ..." line will always be at index 8
and i don't open the same userfile twice:
- open the template userfile, read all data, close template userfile (uid = 101)
- modify that data, write it to the new userfile (uid = 102 or 103 or ...)
(but i do re-use the $userfile variable for both files)
|