ENGINE-124 group doesn't survive to engine restart #resolve
authorEdouard Tisserant <edouard@pep-project.org>
Thu, 20 Oct 2016 21:46:43 +0200
changeset 1321ad3f23b3d0ac
parent 1320 658ca2113c34
child 1325 5f2e643a4fd7
child 1326 3d97f4c0ee25
ENGINE-124 group doesn't survive to engine restart #resolve
src/pEpEngine.c
     1.1 --- a/src/pEpEngine.c	Thu Oct 20 19:30:18 2016 +0200
     1.2 +++ b/src/pEpEngine.c	Thu Oct 20 21:46:43 2016 +0200
     1.3 @@ -319,10 +319,11 @@
     1.4  
     1.5          // Set person, but if already exist, only update.
     1.6          // if main_key_id already set, don't touch.
     1.7 -        sql_set_person = "insert or replace into person (id, username, lang, main_key_id)"
     1.8 +        sql_set_person = "insert or replace into person (id, username, lang, main_key_id, device_group)"
     1.9                           "  values (?1, ?2, ?3,"
    1.10                           "    (select coalesce((select main_key_id from person "
    1.11 -                         "      where id = ?1), upper(replace(?4,' ',''))))) ;";
    1.12 +                         "      where id = ?1), upper(replace(?4,' ','')))),"
    1.13 +                         "    (select device_group from person where id = ?1)) ;";
    1.14  
    1.15          sql_set_device_group = "update person set device_group = ?1 "
    1.16                                 "where id = '" PEP_OWN_USERID "';";