user_picture_enabled()
Returns whether this site supports the default user picture feature.
This approach preserves compatibility with node/comment templates. Alternate user picture implementations (e.g., Gravatar) should provide their own add/edit/delete forms and populate the 'picture' variable during the preprocess stage.
File
- core/modules/user/user.module, line 130
- Enables the user registration and login system.
Code
1 2 3 4 | function user_picture_enabled() { $field_definitions = \Drupal::entityManager()->getFieldDefinitions( 'user' , 'user' ); return isset( $field_definitions [ 'user_picture' ]); } |
Please login to continue.