Last active
August 29, 2015 14:17
-
-
Save hissy/510fb0643e6c47136e35 to your computer and use it in GitHub Desktop.
#concrete5 #concrete56 Manually add a UserAttributeKey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Attribute Type Handle | |
$akTypeHandle = 'text'; | |
// Get your package | |
$pkg = Package::getByHandle('your_package_handle'); | |
// Attributes | |
$args = array( | |
'akHandle' => 'example_attribute', | |
'akName' => 'Example Attribute', | |
'akIsSearchableIndexed' => 0, | |
'akIsSearchable' => 1, | |
'uakProfileDisplay' => 1, | |
'uakProfileEdit' => 1, | |
'uakProfileEditRequired' => 1, | |
'uakRegisterEdit' => 1, | |
'uakRegisterEditRequired' => 0, | |
'uakMemberListDisplay' => 0 | |
); | |
// Add | |
UserAttributeKey::add($akTypeHandle, $args, $pkg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment