How to insert user preference sql query?

Hello Guys,

Please help, I want to write php script to save number of users and I want to add name for each user.
I can add info of login and password in ajxp_users table.
However, how to insert the user name and email?

How to define a customer blob in ajxp_user_prefs?

I used pydio version 8.0.2

Hi Hana90, why not using API instead?
The user displayName is stored in his personal role, not the preferences. So you would have to manually create a role, add a paramter for plugin core.conf => displayName and serialize it (the php way) and store it in the ajxp_role db.
Maybe the simple way would be to first create a user, set his name, and have a look at the db content for his role.
Charles

Hello Charles
Thank you for your reply.
Please could you check the following steps I did:
USING PYDIO admin setting:
1- add user (new1)
2- change user name (Myname1)
3- I go to ajxp_roles table, for the same user(new1) who has been just created, I take the serial role:

O:25:“Pydio\Conf\Core\AJXP_Role”:9:{s:12:“*groupPath”;N;s:9:“*roleId”;s:18:“AJXP_USR_/new1”;s:7:“*acls”;a:0:{}s:13:“*parameters”;a:1:{s:19:“AJXP_REPO_SCOPE_ALL”;a:1:{s:9:“core.conf”;a:1:{s:17:“USER_DISPLAY_NAME”;s:6:“Myname1”;}}}s:10:“*actions”;a:0:{}s:14:“*autoApplies”;a:0:{}s:8:“*masks”;a:0:{}s:14:“*lastUpdated”;i:1519549403;s:10:“*ownerId”;N;}

last_updated: 1519548820

Then did the following steps manually using sql query in (ajxp_users table)
1- add new user using query insert to ajxp_users with login (new2)
2- add a new role for this user, I take the previous serial role and same last_updated, but I change the user and his name:

O:25:“Pydio\Conf\Core\AJXP_Role”:9:{s:12:“*groupPath”;N;s:9:“*roleId”;s:18:“AJXP_USR_/new2”;s:7:“*acls”;a:0:{}s:13:“*parameters”;a:1:{s:19:“AJXP_REPO_SCOPE_ALL”;a:1:{s:9:“core.conf”;a:1:{s:17:“USER_DISPLAY_NAME”;s:6:“Myname2”;}}}s:10:“*actions”;a:0:{}s:14:“*autoApplies”;a:0:{}s:8:“*masks”;a:0:{}s:14:“*lastUpdated”;i:1519549403;s:10:“*ownerId”;N;}

Unfortunately, when I open admin setting it doesn’t take the user NAME and the same when I log in as “new2” user!

Please, could you help me in this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.