#14 auto-fill /home/username on usermanagement

open
nobody
Misc (6)
5
2007-06-23
2007-06-23
morgajel
No

95% of the time, the user's home directory is /home/username. Since we collect the username before the /home dir, we should autofill the home field with /home/username- I'm thinking functionality similar to kdevelop when it asks for a projectname and creates the project directory name right below.

#fired when a character is added to usernamefield
def usernamefield.change()
if ( homefield == "/home/"+usernamefield.chop)
homefield="/home/"+usernamefield

it only changes it when homefield only contains /home/ followed by part of the username- don't want someone first adding /home/u/use/username or something advanced like that only to have us pooch it when the add a username to the usernamefield

obviously it'll have to track adding characters as well as removing characters, but you get the idea.

Discussion