Roundcube Community Forum

 

Identities table at first login

Started by eekamouse, April 04, 2008, 12:37:11 PM

Previous topic - Next topic

eekamouse

Hi,

I'm not sure about the right section for my request, general topic or bug section.

In previous version, identities table was automatically filled up at first login of my new users, that was pretty useful. ( Postfix + mysql virtual users). Since 0.1 stable version new users do not have any entry created in this table and, as a result, cannot send any emails because the sender field is empty. So i had to create my own script to make the job... Could someone tell me if that "new" feature is voluntary or a just a bug? Or maybe something i've missed in the config file ?

Thx a lot

eric06

I am also having this problem. Could I ask how you made the script to create the identities at log on?
eLime Hosting Company | http://www.elimehostingcompany.com

rmc2000

i have the same problem! i need know how to fix it and make possible create the identities of user in your first login

Please someone can help?

Thanks!

evb

Did you verify the eventually sql error in the error log of roundcube?
I had to adapt the not null allowed string fields of the identity table to the value 'default' and the ntext field to allow null values. (you could also put the string fields not allowed, but I prefer to give a default value, because not allowing null values give you a data consistent protection on database level)

bpat1434

#4
I'm not 100% sure, but could you verify whether or not your SQL server has Strict mode enabled.  I think that's the issue, as someone here has had an issue before, and that's the only difference I could see between my server and his is the strict server setting.

A solution to this is to edit /program/includes/rcube_users.inc and look inside the create function.  You should search for the area that looks like:

"INSERT INTO " . get_table_name('identities')

And replace it with:
          $DB->query(
            
"INSERT INTO ".get_table_name('identities')."
              (identity_id, user_id, del, standard, name, email, organization, reply-to, bcc, signature, html_signature)
             VALUES (NULL, ?, 0, 1, ?, ?, '', '', '', '', '')"
,
            
$user_id,
            
strip_newlines($user_name),
            
preg_replace('/^@/'$user '@'$sql_arr[0]));


There are two places this needs to be edited at.