Ticket #4552: sage-4552.patch

File sage-4552.patch, 1.2 KB (added by TimothyClemans, 14 years ago)
  • sage/server/notebook/twist.py

    # HG changeset patch
    # User Timothy Clemans <timothy.clemans@gmail.com>
    # Date 1227117954 18000
    # Node ID 5bcec888673b87a69c4c77af83c9424ab991becc
    # Parent  efee696877657f4f17d61655e158c5df84689c69
    #4552
    
    diff -r efee69687765 -r 5bcec888673b sage/server/notebook/twist.py
    a b  
    18791879       
    18801880    def render(self, request):       
    18811881        input_boxes = ['username', 'password', 'retype_password']
     1882        if notebook.conf()['email']:
     1883            input_boxes.append('email')
    18821884        is_valid_dict = {'username': is_valid_username, 'password': is_valid_password,
    18831885                         'retype_password': do_passwords_match, 'email': is_valid_email}
    18841886       
     
    19571959            try:
    19581960                e = filled_in['email'] if notebook.conf()['email'] else ''
    19591961                self.userdb.add_user(filled_in['username'], request.args['password'][0],
    1960                                      e, force=True)
     1962                                     e)
    19611963            except ValueError:
    19621964                template_dict['username_taken'] = True
    19631965                errors_found()