rejetto forum

user list group

0 Members and 1 Guest are viewing this topic.

Offline radioactive68

  • Occasional poster
  • *
    • Posts: 35
    • View Profile
1. I want to make a list of one group of users. But my script doesn't see the user if it consists of multiple groups

Quote
{.for each|u|{.replace|;|{.no pipe||.}|{.get|accounts.}.}|{:
   {.set|{.^u.}m|{.get account|{.^u.}|member of.}.}
   {.set|{.^u.}g|{.get account|{.^u.}|is group.}.}

   {.if|{.{.^{.^u.}g.}=.}|
      {.if|
         {.{.^{.^u.}m.}=administrator.}
         |
         {.^u.} - admin<br />
      .}
   .}
:}.}



2. what the script will remove the user?
« Last Edit: November 09, 2014, 01:56:31 PM by radioactive68 »
Templates: puro, rywy, cln, limeo


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
1.
you are setting those two variables u+m and u+g, but apparently you can use their value directly, without using a variable.
So, it would be this way (not tested!)

Code: [Select]
{.for each|u|{.replace|;|{.no pipe||.}|{.get|accounts.}.}|{:

  {.if
  | {.and
    | {.administrator={.get account|{.^u.}|member of.}.}
    | {.not|{.get account|{.^u.}|is group.}.}
    /and.}
  | {.^u.} - admin<br />   
  /if.}

:}.}

2.
there's no command to delete accounts, currently.
Would you need it?


Offline radioactive68

  • Occasional poster
  • *
    • Posts: 35
    • View Profile
1.
you are setting those two variables u+m and u+g, but apparently you can use their value directly, without using a variable.
So, it would be this way (not tested!)

Code: [Select]
{.for each|u|{.replace|;|{.no pipe||.}|{.get|accounts.}.}|{:

  {.if
  | {.and
    | {.administrator={.get account|{.^u.}|member of.}.}
    | {.not|{.get account|{.^u.}|is group.}.}
    /and.}
  | {.^u.} - admin<br />   
  /if.}

:}.}

Sorry, does not work. Occurs the same as in the first embodiment

2.
there's no command to delete accounts, currently.
Would you need it?

I am doing the admin panel/private office, I would like to have the function

google translate  8)
« Last Edit: November 12, 2014, 05:12:56 AM by radioactive68 »
Templates: puro, rywy, cln, limeo


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
1. ah ah, sorry, while busy optimizing i forgot your real needs :)

instead of {.administrator={.get account|{.^u.}|member of.}.}
use the specific command {.member of|administrator|user={.^u.}.}

you can see documentation at http://www.rejetto.com/wiki/index.php?title=HFS:_scripting_commands#Account_manipulation

2. it already exists, i just forgot to document it!
{.delete account|radioactive68.}


Offline radioactive68

  • Occasional poster
  • *
    • Posts: 35
    • View Profile