Community discussions

MUM Europe 2020
 
snoozer
Member Candidate
Member Candidate
Topic Author
Posts: 154
Joined: Mon Jun 18, 2007 5:13 pm
Location: Schull, West-Cork, Ireland.

UM: reset-counters script for users with prefix only

Mon Jul 28, 2008 5:12 pm

hello,

i am looking for a way to issue the reset-counters command from a script once a month but only for users with the prefix XY-. example:

users:

aa-001
aa-002
XY-001
XY-002

i want only XY-'s users counters to be reseted. is that somehow possible ? using the webinterface or the terminal is not an option.

regards
Jan
 
heiko_s
newbie
Posts: 40
Joined: Tue Jul 10, 2007 10:02 am
Location: germany

Re: UM: reset-counters script for users with prefix only

Wed Jul 30, 2008 10:49 am

Hi,
sure that is possible,
take a foreach loop for all users and cut off the first x characters from the name.
The proof with one ore more if quests if string matches your desired.
If yes - reset counter.

At the moment i'm not in front of a MT box - so i can't give you the exact code, but if you need it, i'll give it to you thies evening.
Regards

Who is online

Users browsing this forum: No registered users and 29 guests