'''
Created on Oct 7, 2010

@author: jnaous
'''
from expedient_geni.utils import get_or_create_user_cert

class CreateUserGID(object):
    """Middleware to create GIDs for users who login and do not have one."""
    def process_request(self, request):
        get_or_create_user_cert(request.user)


@@ -241,24 +241,72 @@
 , request):%0A
+        if request.user.is_authenticated():%0A    
         get_

fix bug in trying to create cert for unauthed users