'nickname' not displaying in GUI [Seafile Pro 7.1.11]

Hi,

Using LDAP-sync with ENABLE_EXTRA_USER_INFO_SYNC=true. Users are synced fine, and can login. However, I notice that the “Name” of the user within the web GUI is not their full name (as specified in the LDAP database). At first I thought that there was something wrong with the LDAP-sync itself, but after further investigation that does not seem to be the case.

Modifying pro/python/seafevents/ldap_syncer/ldap_user_sync.py, and adding debug print in update_profile(), it is clear that db_user.name == ldap_user.name;

seafile@storage1:~/seafile-server-latest/pro$ ./pro.py ldapsync
db: Ruben Foo1, ldap: Ruben Foo1
db: Joachim Tingvold, ldap: Joachim Tingvold
db: Martin Foo2, ldap: Martin Foo2
db: Mikael Foo3, ldap: Mikael Foo3
db: Aleksander Foo4, ldap: Aleksander Foo4
[02/03/2021 16:24:29] [INFO] LDAP user sync result: add [0]user, update [0]user, deactive [0]user, add [0]role, update [0]role
[02/03/2021 16:24:29] [INFO] LDAP profile sync result: add [0]profile, update [0]profile, delete [0]profile
[02/03/2021 16:24:29] [INFO] LDAP dept sync result: add [0]dept, update [0]dept, delete [0]dept

This is also confirmed by looking at the database tables;

[seahub]> select * from profile_profile;
+----+--------------------+-----------------------+-------+-----------+----------+---------------+-------------+----------------------+
| id | user               | nickname              | intro | lang_code | login_id | contact_email | institution | list_in_address_book |
+----+--------------------+-----------------------+-------+-----------+----------+---------------+-------------+----------------------+
|  8 | aleksander@foo.com | Aleksander Foo4       |       | NULL      | NULL     | NULL          | NULL        |                    0 |
| 11 | jocke@foo.com      | Joachim Tingvold      |       | NULL      | NULL     | NULL          | NULL        |                    0 |
| 14 | rbe@foo.com        | Ruben Foo1            |       | NULL      | NULL     | NULL          | NULL        |                    0 |
| 17 | martin@foo.com     | Martin Foo2           |       | NULL      | NULL     | NULL          | NULL        |                    0 |
| 20 | mikael@foo.com     | Mikael Foo3           |       | NULL      | NULL     | NULL          | NULL        |                    0 |
+----+--------------------+-----------------------+-------+-----------+----------+---------------+-------------+----------------------+
5 rows in set (0.000 sec)

[seahub]> select * from profile_detailedprofile;
+----+----------------+------------+-----------+
| id | user           | department | telephone |
+----+----------------+------------+-----------+
| 11 | jocke@foo.com  |            |           |
| 14 | rbe@foo.com    |            |           |
| 17 | martin@foo.com |            |           |
| 20 | mikael@foo.com |            |           |
+----+----------------+------------+-----------+
4 rows in set (0.000 sec)

[ccnet]> select * from LDAPUsers;
+----+--------------------+----------+----------+-----------+-------------+--------------+
| id | email              | password | is_staff | is_active | extra_attrs | reference_id |
+----+--------------------+----------+----------+-----------+-------------+--------------+
|  8 | aleksander@foo.com |          |        1 |         1 | NULL        | NULL         |
| 11 | jocke@foo.com      |          |        0 |         0 | NULL        | NULL         |
| 14 | rbe@foo.com        |          |        0 |         1 | NULL        | NULL         |
| 17 | martin@foo.com     |          |        0 |         1 | NULL        | NULL         |
| 20 | mikael@foo.com     |          |        0 |         1 | NULL        | NULL         |
+----+--------------------+----------+----------+-----------+-------------+--------------+

In other words; the sync seems fine, the data in DB seems fine. However, looking at the user list, their full name is not shown;

Prior to taking that screenshot, the “rbe@foo.com” user only had “rbe” as it’s name in the GUI. I took a full database dump (of all three databases), changed the name manually via the GUI (from “rbe” to “Ruben Foo1”), and then did a new, complete dump. There was no diff (of relevance) between the two dumps, however there is clearly a difference.

I’ve made sure to restart the seafile & seahub service, and also incognito mode in browser, to eliminate any potential caching issue.

What is going on here? Why is the GUI displaying essentially “wrong” information?

Just try restarting memcached.

Thanks, that seems to have been the culprit. What is the default TTL that Seafile uses for it’s entries in memcached? Maybe it should trigger a flush for relevant entries whenever LDAP-sync has profile changes?