diff options
author | redmatrix <git@macgirvin.com> | 2016-03-07 16:54:58 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-03-07 16:54:58 -0800 |
commit | 848c0389704ab14aeecc77a5b8bd5d9e7ec4ad06 (patch) | |
tree | f2cabcf08274f5043c2f5a2631faef1bae81cf66 /mod | |
parent | 1a77fb4c1d4348ed75ab220f73526294f13606a3 (diff) | |
download | volse-hubzilla-848c0389704ab14aeecc77a5b8bd5d9e7ec4ad06.tar.gz volse-hubzilla-848c0389704ab14aeecc77a5b8bd5d9e7ec4ad06.tar.bz2 volse-hubzilla-848c0389704ab14aeecc77a5b8bd5d9e7ec4ad06.zip |
issue #313
Diffstat (limited to 'mod')
-rw-r--r-- | mod/profiles.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mod/profiles.php b/mod/profiles.php index 3ae1390df..fe45f1b92 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -272,9 +272,17 @@ function profiles_post(&$a) { $name = escape_tags(trim($_POST['name'])); - if($orig[0]['name'] != $name) + if($orig[0]['name'] != $name) { $namechanged = true; + $v = validate_channelname($name); + if($v) { + $notice($v); + $namechanged = false; + $name = $orig[0]['name']; + } + } + $pdesc = escape_tags(trim($_POST['pdesc'])); $gender = escape_tags(trim($_POST['gender'])); $address = escape_tags(trim($_POST['address'])); @@ -563,6 +571,10 @@ function profiles_post(&$a) { dbesc(datetime_convert()), dbesc($channel['xchan_hash']) ); + $r = q("UPDATE channel SET channel_name = '%s' WHERE channel_hash = '%s'", + dbesc($name), + dbesc($channel['xchan_hash']) + ); } if($is_default) { |