function certificate_test_certificate_map in Certificate 7.2
Same name and namespace in other branches
- 8.3 modules/certificate_test/certificate_test.module \certificate_test_certificate_map()
- 6.2 modules/certificate_test/certificate_test.module \certificate_test_certificate_map()
- 7.3 modules/certificate_test/certificate_test.module \certificate_test_certificate_map()
- 3.x modules/certificate_test/certificate_test.module \certificate_test_certificate_map()
Implements certificate_map().
File
- modules/
certificate_test/ certificate_test.module, line 21
Code
function certificate_test_certificate_map($node, $user, $map_type, $options) {
if ($map_type == 'firstletter') {
foreach ($options as $option) {
// User selected $option
if ($user->name[0] == $option) {
// User's first letter matched selected options.
return $option;
}
}
}
}