]> git.mxchange.org Git - friendica.git/blobdiff - mod/profiles.php
Merge pull request #787 from balderino/master
[friendica.git] / mod / profiles.php
index 1fc1f484a3035e0043c6b9ef86a5d8df01a73cb5..148c632914a568a16b93e562f400b24b79818533 100644 (file)
@@ -6,8 +6,6 @@ function profiles_init(&$a) {
        nav_set_selected('profiles');
 
        if(! local_user()) {
-               notice( t('Permission denied.') . EOL);
-               killme();
                return;
        }
 
@@ -457,6 +455,10 @@ function profiles_post(&$a) {
                                dbesc(datetime_convert()),
                                intval(local_user())
                        );
+                       $r = q("UPDATE `user` set `username` = '%s' where `uid` = %d limit 1",
+                               dbesc($name),
+                               intval(local_user())
+                       );
                }
 
                if($is_default) {
@@ -565,6 +567,11 @@ function profile_activity($changed, $value) {
 
 function profiles_content(&$a) {
 
+       if(! local_user()) {
+               notice( t('Permission denied.') . EOL);
+               return;
+       }
+
        $o = '';
 
        if(($a->argc > 1) && (intval($a->argv[1]))) {