]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
tag display with item
[friendica.git] / mod / register.php
index 549d07a91896b58a6c3185885327124a5f9aa986..85e1f9faa098b6af371e408e4f3b8677982acbfa 100644 (file)
@@ -198,9 +198,10 @@ function register_post(&$a) {
        $spkey = openssl_pkey_get_details($sres);
        $spubkey = $spkey["key"];
 
-       $r = q("INSERT INTO `user` ( `username`, `password`, `email`, `openid`, `nickname`,
+       $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', %d, %d )",
+               VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
+               dbesc(generate_user_guid()),
                dbesc($username),
                dbesc($new_password_encoded),
                dbesc($email),
@@ -345,6 +346,8 @@ function register_post(&$a) {
        }
 
 
+       call_hooks('register_account', $newuid);
+
        if( $a->config['register_policy'] == REGISTER_OPEN ) {
 
                if($using_invites && $invite_id) {
@@ -370,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 );
@@ -379,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();
@@ -425,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());
                }
 
        }
@@ -498,8 +501,7 @@ function register_content(&$a) {
        }
 
 
-       $license = t('Shared content is covered by the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0</a> license.');
-
+       $license = '';
 
        $o = get_markup_template("register.tpl");
        $o = replace_macros($o, array(