Author Topic: Identities table at first login  (Read 3531 times)

Offline eekamouse

  • Newbie
  • *
  • Posts: 4
Identities table at first login
« on: April 04, 2008, 12:37:11 PM »
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

Offline eric06

  • Newbie
  • *
  • Posts: 9
Re: Identities table at first login
« Reply #1 on: April 12, 2008, 01:33:18 AM »
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

Offline rmc2000

  • Jr. Member
  • **
  • Posts: 40
Re: Identities table at first login
« Reply #2 on: April 15, 2008, 11:05:03 AM »
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!

Offline evb

  • Jr. Member
  • **
  • Posts: 34
Identities table at first login
« Reply #3 on: May 16, 2008, 06:59:13 AM »
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)

Offline bpat1434

  • Administrator
  • Hero Member
  • *****
  • Posts: 673
Identities table at first login
« Reply #4 on: May 16, 2008, 08:18:18 AM »
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.
« Last Edit: May 16, 2008, 03:23:32 PM by bpat1434 »