Roundcube Community Forum

 

Add the user's real name to the RC db from the cpanel reg. form

Started by moepro, January 26, 2009, 06:58:20 AM

Previous topic - Next topic

moepro

hello guys, i have been trying to make a pop3 accounts signup page for my site, but then i realize that in RC every user has to set his real name by itself, so do you guys have an idea about doing that?
i was thinkin of many ways like if the register is successful from the cp form, to add the user to RC database by a separated script.
or to force the user to add it on the first login?

or in RC to edit the code, to let it add the name when it creates the user tables in its database and make it add the name.

Regards, Moe


rosali

First of all the has to exist in RoundCube database. So I don't believe you can do along with the cpanel login script in an easy way. But sure, you can modify RoundCube code to fill identies table by data stored in you cpanel configuration. I'm not familiar with cpanel so I can give you only a starting point in the RoundCube code:

./program/include/rcube_user.php

        // also create new identity records
        $dbh->query(
          "INSERT INTO ".get_table_name('identities')."
            (user_id, del, standard, name, email)
           VALUES (?, 0, 1, ?, ?)",
          $user_id,
          strip_newlines($user_name),
          strip_newlines($user_email));


... where $user_name has to contain your cpanel "Real Name".
Regards,
Rosali