aboutsummaryrefslogtreecommitdiffstats
path: root/include/identity.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-02 23:28:51 -0700
committerfriendica <info@friendica.com>2014-08-02 23:28:51 -0700
commit44ee18b810b8671c9b522b06a5d8d0e62a3bef00 (patch)
treebc0d09b607de999d0f8bef535f4df9b84dd1adae /include/identity.php
parentae82df4399781ab542bc0799425e0f17b9481d53 (diff)
downloadvolse-hubzilla-44ee18b810b8671c9b522b06a5d8d0e62a3bef00.tar.gz
volse-hubzilla-44ee18b810b8671c9b522b06a5d8d0e62a3bef00.tar.bz2
volse-hubzilla-44ee18b810b8671c9b522b06a5d8d0e62a3bef00.zip
Let site admin choose what profile fields to support.
Diffstat (limited to 'include/identity.php')
-rw-r--r--include/identity.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/include/identity.php b/include/identity.php
index c4134d3e8..feb249ea3 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1312,3 +1312,40 @@ function is_public_profile() {
return true;
return false;
}
+
+function get_profile_fields_basic() {
+ $profile_fields_basic = get_config('system','profile_fields_basic');
+ if(! $profile_fields_basic)
+ $profile_fields_basic = array('name','pdesc','gender','dob','address','locality','region','postal_code','country_name','marital','sexual','homepage','hometown','keywords','about','contact');
+
+// return $profile_fields_basic;
+ $x = array();
+ if($profile_fields_basic)
+ foreach($profile_fields_basic as $f)
+ $x[$f] = 1;
+
+ return $x;
+
+}
+
+
+function get_profile_fields_advanced() {
+ $basic = get_profile_fields_basic();
+ $profile_fields_advanced = get_config('system','profile_fields_advanced');
+ if(! $profile_fields_advanced)
+ $profile_fields_advanced = array('with','howlong','politic','religion','likes','dislikes','interest','channels','music','book','film','tv','romance','work','education');
+
+// return $profile_fields_advanced;
+
+ $x = array();
+ if($basic)
+ foreach($basic as $f => $v)
+ $x[$f] = $v;
+ if($profile_fields_advanced)
+ foreach($profile_fields_advanced as $f)
+ $x[$f] = 1;
+
+ return $x;
+}
+
+