Project

General

Profile

« Previous | Next » 

Revision 9b4fdd83

Added by Serghei Mihai about 9 years ago

user fullname saved before name

View differences:

ckanext/ozwillo_pyoidc/plugin.py
173 173

  
174 174
                    member_create(member_create_context, member_dict)
175 175

  
176
            if 'given_name' in userinfo:
177
                userobj.fullname = userinfo['given_name']
178
            if 'family_name' in userinfo:
179
                userobj.fullname += ' ' + userinfo['family_name']
180
            userobj.save()
181

  
176 182
            if 'nickname' in userinfo:
177 183
                userobj.name = userinfo['nickname']
178 184
            try:
......
180 186
            except Exception, e:
181 187
                log.warning('Error while saving user name: %s' % e)
182 188

  
183
            if 'given_name' in userinfo:
184
                userobj.fullname = userinfo['given_name']
185
            if 'family_name' in userinfo:
186
                userobj.fullname += ' ' + userinfo['family_name']
187
            userobj.save()
188 189
            session['user'] = userobj.id
189 190
            session.save()
190 191

  

Also available in: Unified diff