Changeset 1297
- Timestamp:
- 11/20/07 13:44:59 (1 year ago)
- Files:
-
- devel/mod/profile/profile.config.php (modified) (6 diffs)
- devel/profile/profile.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/profile/profile.config.php
r1046 r1297 21 21 22 22 $obj = new stdClass; 23 $obj->name // Description 24 $obj->internal_name // Short / unique internal name 25 $obj->field_type // Type of field 26 $obj->description // User instructions for entering data 27 $obj->user_type // Type of user that can see this field 28 $obj->required // True/false: whether field is required 29 $obj->category // Category field sits in 30 $obj->invisible // If true, won't display except on edit screen 31 $obj->registration // Will appear on user registration 23 $obj->name // Description 24 $obj->internal_name // Short / unique internal name 25 $obj->field_type // Type of field 26 $obj->description // User instructions for entering data 27 $obj->user_type // Type of user that can see this field 28 $obj->required // True/false: whether field is required 29 $obj->category // Category field sits in 30 $obj->invisible // If true, won't display except on edit screen 31 $obj->registration // Will appear on user registration 32 $obj->col1 // If true, will appear on the profile, first column 33 // otherwise, only on the extended profile 34 $obj->default_access // if $CFG->default_access = 'PUBLIC', set this 35 // to 'LOGGED_IN' or 'PRIVATE' to force a field to default to 36 // 'LOGGED_IN'. This is to avoid users making things 37 // public by mistake. 32 38 $data['profile:details'][] = $obj; 33 39 … … 74 80 "invisible" => false, 75 81 "required" => false, 82 "col2" => true, 76 83 )); 77 84 $data['profile:details'][] = (object)(array( … … 84 91 "invisible" => false, 85 92 "required" => false, 93 "col2" => true, 86 94 )); 87 95 … … 110 118 "required" => false, 111 119 "user_type" => "", 120 "default_access" => 'PRIVATE', 112 121 )); 113 122 $data['vcard:profile:adr'][] = array("streetaddress","vCard:Street","collated","enclosed"); … … 194 203 "required" => false, 195 204 "user_type" => "", 205 "default_access" => 'PRIVATE', 196 206 )); 197 207 $data['foaf:profile'][] = array("homephone","foaf:phone","individual","resource"); … … 219 229 "col2" => true, 220 230 "user_type" => "", 231 "default_access" => 'PRIVATE', 221 232 )); 222 233 $data['foaf:profile'][] = array("workweb","foaf:workplaceHomepage","individual","resource"); devel/profile/profile.class.php
r1030 r1297 241 241 $value = ""; 242 242 $value->value = ""; 243 $value->access = $CFG->default_access; 244 } 243 if(isset($field->default_access)) { // default access can be set on a per profile field basis 244 $value->access = $field->default_access; 245 } else { 246 $value->access = $CFG->default_access; 247 } 248 } 245 249 } else { 246 250 $value = ""; 247 251 $value->value = $data['profile:preload'][$fname]; 248 252 if (!isset($data['profile:preload:access'][$fname])) { 249 $value->access = $CFG->default_access; 253 if(isset($field->default_access)) { 254 $value->access = $field->default_access; 255 } else { 256 $value->access = $CFG->default_access; 257 } 250 258 } else { 251 $value->access = $data['profile:preload:access'][$fname];259 $value->access = $data['profile:preload:access'][$fname]; 252 260 } 253 261
