ENGINE-289: added default user_id aliases to myself() ENGINE-289
authorKrista Bennett <krista@pep-project.org>
Wed, 17 Jan 2018 01:18:18 +0100
branchENGINE-289
changeset 239909faff2e1f54
parent 2398 2365cdba8783
child 2401 f5aa974726e1
ENGINE-289: added default user_id aliases to myself()
src/keymanagement.c
     1.1 --- a/src/keymanagement.c	Wed Jan 17 01:01:10 2018 +0100
     1.2 +++ b/src/keymanagement.c	Wed Jan 17 01:18:18 2018 +0100
     1.3 @@ -783,8 +783,12 @@
     1.4  
     1.5      // Deal with non-default user_ids.
     1.6      if (default_own_id && strcmp(default_own_id, identity->user_id) != 0) {
     1.7 -//        status = add_alternate_own_userid(session, 
     1.8 -//                                          identity->user_id);
     1.9 +        
    1.10 +        status = set_userid_alias(session, default_own_id, identity->user_id);
    1.11 +        // Do we want this to be fatal? For now, we'll do it...
    1.12 +        if (status != PEP_STATUS_OK)
    1.13 +            goto pep_free;
    1.14 +            
    1.15          free(identity->user_id);
    1.16          identity->user_id = strdup(default_own_id);
    1.17          if (identity->user_id == NULL) {