User and Group "Command to run after making changes" Enhancement

I could use a few more variables in the webmin before and after user scripts. What is missing is the email prefix. It could be this data is not available, but I believe it is.

When you add a user to a virtualmin virtual server, via the edit mail and ftp users screens, that screen asks for the email address, and you enter the part before the domainname. THAT is the user I want to capture. However, I realize it's not really the user being added to webmin, this might be user.something. That user is already captured in $USERADMIN_USER. So, I am looking for another variable with the user portion before the domain portion.

Why I believe this is available is it is in fact in the USERADMIN_HOME as the last portion of the path.

The reason for this is I am scripting something that requires the users email address. You had previously added $USERADMIN_DOM which gives me the domain portion, now, I need the user portion. I would new the new one, and the old one in the case of a MODIFY_USER.

Do you think this is possible? I suppose I could just script out the last portion of the home, as long as that is ALWAYS the email prefix, but not sure it is... I think it will always be? In some cases where a name is too long, perhaps a duplicate, not sure how the name is calculated.

Status: 
Closed (fixed)

Comments

That's a good idea .. in the next release, I will add the $USERADMIN_EMAIL environment variable that you can use in this situation.

Automatically closed -- issue fixed for 2 weeks with no activity.