import from csv file – mod to enrich "notes" field

Home Page Forums Network Management ZeroTruth import from csv file – mod to enrich "notes" field

This topic contains 1 reply, has 2 voices, and was last updated by  fulvio 6 months, 1 week ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #63960

    Maurizio Andreotti
    Participant

    I have to import a lot of users from csv file where username shall be a number. In this situation, when new users are imported into zerotruth, the “info” filed cannot be populated which imply that “user name and other infos” are not shown into zeroshell (not zerotruth) user management interface, so it gets difficult to see who is behind each numeric ID

    to overcome this situaion i did a small modification to the adduserfile.sh:
    (/DB/apache2/cgi-bin/zerotruth/addusersfile.sh) so to import an extra field from the CSV and append it to the “info” inserted in the submission form.

    hopefully someone else will benefit this, and maybe can be incorporated in the code for the next release.

    ——–

    at line 74c73:
    added this new line:
    INFO="$INFOFORM $(echo "$RIGA" | cut -d',' -f8)"

    at line 481c480 I modified this

    <input type=text class=\"info\" name=\"INFO\" value=\"\"><br>&nbsp;<br></td></tr>
    

    into this:
    <input type=text class=\"info\" name=\"INFOFORM\" value=\"\"><br>&nbsp;<br></td></tr>

    #63965

    fulvio
    Keymaster

    Many thanks to Maurizio for this code.
    Regards
    Fulvio

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.