rejetto forum
Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: radioactive68 on November 09, 2014, 01:53:19 PM
-
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
{.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?
-
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!)
{.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?
-
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!)
{.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)
-
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.}
-
thank you, rejetto