Repository navigation
|
With reference to the Can anyone advise how I would do this? I know little about manual database manipulation (I am using an SQLite database) and even if I could learn enough from Googling to determine the right commands I am assuming I will also need some knowledge of the specific table(s) and their layout(?) in order to ensure I am populating the right fields (and enough of them to meet the minimum set required). In case the context and rationale matters, whilst I could set this option to true and let users set themselves up (perhaps aided by the |
Replies: 1 comment 2 replies
|
You only need one row in the What Roundcube checks at login With roundcubemail/program/include/rcmail.php Line 773 in e46005c roundcubemail/program/include/rcmail.php Lines 820 to 826 in e46005c So these two values have to be exactly what Roundcube computes:
The other columns can be left at their defaults. Roundcube itself stores roundcubemail/program/lib/Roundcube/rcube_user.php Lines 651 to 659 in e46005c Table layout: roundcubemail/SQL/sqlite.initial.sql Lines 7 to 19 in e46005c roundcubemail/SQL/sqlite.initial.sql Lines 85 to 99 in e46005c SQL for SQLite Make a copy of the database file first (the path is in INSERT INTO users (username, mail_host, created, language, preferences)
VALUES ('jane@example.com', 'mail.example.com', datetime('now'), 'en_US', 'a:0:{}');
INSERT INTO identities (user_id, changed, standard, name, email)
SELECT user_id, datetime('now'), 1, 'Jane Doe', 'jane@example.com'
FROM users
WHERE username = 'jane@example.com' AND mail_host = 'mail.example.com';
To check what you created: SELECT user_id, username, mail_host FROM users;
SELECT identity_id, user_id, standard, name, email FROM identities;Alternative for the identity part On 1.7 and later there is a script for identities, so only the ( I tested the above against a fresh database created from |
You only need one row in the
userstable for the login to be allowed, plus (recommended) one row inidentitiesso the user has a From address. That is what Roundcube itself writes whenauto_create_useris true.What Roundcube checks at login
With
auto_create_user = false, the login looks the user up by two columns,usernameandmail_host, and refuses the login if no row matches:roundcubemail/program/include/rcmail.php
Line 773 in e46005c
roundcubemail/program/include/rcmail.php
Lines 820 to 826 in e46005c