Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By IRPro on
Hello
I want to add user Username, Email and password into 2 databases(one drupal DB and My_log DB).
how can i find drupal add users function and register function, to edit this and insert my codes to this function.
Thanks
Comments
One should never edit core
One should never edit core code, it makes it hard if not impractical to update.
Instead you can implement a module that implements hook_user_save() or hook_user_insert() and hook_user_update()
From a security point of view the unhashed password should not be stored anywhere.
And if you are trying to implement signing in between systems there are are ways to do that the the other system(s) may support.
Thanks nevets
Thanks nevets
yes i want to integrate drupal with owncloud.
when user register in drupal ,this function will run and create same user in owncloud :
function add_new_user ($username, $password, $serverip)
{
$url= "http://$adminusername:$adminpassword@$serverip/ocs/v1.php/cloud"
$data= array( 'userid' => $username,
'password' => $password,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
echo $server_output;
}