]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
add diaspora support to dfrn_confirm (friendship confirmation)
[friendica.git] / mod / register.php
index 94eac7a14e885099a8a51bd2bba8971fb98bedb5..fbd21a567f7e513f805810cdf9e4e56e6e7edb56 100644 (file)
@@ -201,7 +201,7 @@ function register_post(&$a) {
        $r = q("INSERT INTO `user` ( `guid`, `username`, `password`, `email`, `openid`, `nickname`,
                `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked` )
                VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
-               dbesc(generate_guid()),
+               dbesc(generate_user_guid()),
                dbesc($username),
                dbesc($new_password_encoded),
                dbesc($email),
@@ -346,6 +346,8 @@ function register_post(&$a) {
        }
 
 
+       call_hooks('register_account', $newuid);
+
        if( $a->config['register_policy'] == REGISTER_OPEN ) {
 
                if($using_invites && $invite_id) {
@@ -371,7 +373,7 @@ function register_post(&$a) {
 
                if($res) {
                        info( t('Registration successful. Please check your email for further instructions.') . EOL ) ;
-                       goaway($a->get_baseurl());
+                       goaway(z_root());
                }
                else {
                        notice( t('Failed to send email message. Here is the message that failed.') . $email_tpl . EOL );
@@ -380,7 +382,7 @@ function register_post(&$a) {
        elseif($a->config['register_policy'] == REGISTER_APPROVE) {
                if(! strlen($a->config['admin_email'])) {
                        notice( t('Your registration can not be processed.') . EOL);
-                       goaway($a->get_baseurl());
+                       goaway(z_root());
                }
 
                $hash = random_string();
@@ -426,7 +428,7 @@ function register_post(&$a) {
 
                if($res) {
                        info( t('Your registration is pending approval by the site owner.') . EOL ) ;
-                       goaway($a->get_baseurl());
+                       goaway(z_root());
                }
 
        }