- # if we have a password hash, time to request a password
- if user.get_passhash():
+ # fail if there are non-alphanumeric characters
+ if name != filter(lambda x: x>="0" and x<="9" or x>="a" and x<="z", name):
+ user.error = "bad_name"
+
+ # if that account exists, time to request a password
+ elif name in muffuniv.universe.categories["account"]:
+ user.account = muffuniv.universe.categories["account"][name]