Users not showing up when searching in "Transfer Library" dialogue

Hello!

I’m using version 8.0.3 CE of Seafile server (updated last weekend from version 6.3 via 7.0 an 7.1 to 8.03) and had the following problem:

When I transfer a library I have to enter the full email address of the user in the dialogue. Then the user itself appears below the input field and can be selected. This worked for some users, but most users weren’t found. Copied the address exactly but “User not found”.
I found out that there was a problem with the “profile_profile” table in the seahub.db.
The value in the column “institution” was “NULL” for users that were found and empty for all other users not found.
For new users the value is empty too, allthough for the column “institution” a standard value of “NULL” is set. Version of MariaDB is 5.5.68 if this matters.

Does this happen anywhere else or am i the only one?

Sincerely Reitberger

Hello.

Whether an user can be searched depends on many configurations in seahub_settings.py.

Can you post your seahub_settings.py here, as well as some records in profile_profile table?

Hello!

Thank you for your answer. Bur i should say for me the problem ist solved with a workaround. I fill the coulumn “institution” with “NULL” with a batch. But i was wondering why new users are lacking this “NULL” in “institution” and if i am the only one with this problem!

seahub_settings.py:

-- coding: utf-8 --

SECRET_KEY = “xxx”

DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.mysql’,
‘NAME’: ‘seahub_db’,
‘USER’: ‘seafile’,
‘PASSWORD’: ‘xxx’,
‘HOST’: ‘127.0.0.1’,
‘PORT’: ‘3306’
}
}

CACHES = {
‘default’: {
‘BACKEND’: ‘django_pylibmc.memcached.PyLibMCCache’,
‘LOCATION’: ‘127.0.0.1:11211’,
}
}

EMAIL_USE_TLS = False
EMAIL_HOST = ‘192.168.x.xxx’
EMAIL_HOST_USER = ‘xxx’
EMAIL_HOST_PASSWORD = ‘’
EMAIL_PORT = ‘2525’
DEFAULT_FROM_EMAIL = ‘xxx’
SERVER_EMAIL = ‘xxx’

TIME_ZONE = ‘Europe/Berlin’
SITE_BASE = ‘://xxx’
SITE_NAME = ‘Filehosting-Service xxx’
SITE_TITLE = ‘Filehosting-Service xxx’
SITE_ROOT = ‘/’
ENABLE_SIGNUP = False
ACTIVATE_AFTER_REGISTRATION = False
SEND_EMAIL_ON_ADDING_SYSTEM_MEMBER = True
SEND_EMAIL_ON_RESETTING_USER_PASSWD = True
CLOUD_MODE = True
FILE_PREVIEW_MAX_SIZE = 30 * 1024 * 1024
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2
SESSION_SAVE_EVERY_REQUEST = False
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
ENABLE_USER_CREATE_ORG_REPO = False
ENABLE_GLOBAL_ADDRESSBOOK = False

FILE_SERVER_ROOT = ‘://xxx/seafhttp’

INSERT INTO profile_profile (id, user, nickname, intro, lang_code, login_id, contact_email, institution, list_in_address_book) VALUES
(1, ‘xxx@xxx.xx’, ‘Philipp xxx’, ‘’, ‘de’, NULL, NULL, NULL, 0),
(2, ‘xxx@xxx.xx’, ‘Melina xxx’, ‘’, NULL, NULL, NULL, NULL, 0),
(4, ‘xxx@xxx.xx’, ‘Jana xxx’, ‘’, ‘de’, NULL, NULL, NULL, 0),

Hello.

As you have configured CLOUD_MODE = True and ENABLE_GLOBAL_ADDRESSBOOK = False, so when you search user, Seafile will only search from seahub.contacts_contact and seahub.profile_profile table.

Related codes are

and


So it’s very strange that you can fix the problem by changing value of institution column.


One more question, have you configured custom_search_user feature?

Or can you add some log to seahub/seahub/api2/endpoints/search_user.py to see what happened when you search user?

Hello!

Than you for your support. But now the problem seems gone away. Took me hours and many restarts to find my woraround so it works for me and now i can’t reproduce the error anymore. The only thing i’m still wondering is why a new user gets an empty institution value though it should be set to “NULL” by default.

I think it’s because of this line of code:

Thanks again! Now it works an i think i have understood how things work :slight_smile:

I have had a similar problem for several years.
Some users are shown in the share dialog only after I enter the full email address. Using the username I can only find some of the users.
If I log in with one of the users (which was only findable by email), then I find there the users exclusively over their completely entered email address.
The “NULL” entries have not helped me.

Does anyone have any ideas?