ちなみに、concrete/single_pages/register.php に
$attribs = UserAttributeKey::getRegistrationList();
という記載があり、登録画面で表示する属性を取得しています。この UserAttributeKey クラスの getRegistrationList() メソッドの中身を読めば、先ほどの管理画面でチェックした属性だけを取得する方法が分かるはずです。がんばってください!
Re: 新規ユーザー登録のオプションを属性セット毎に出力したい
2015年3月12日 at 18:42
こうですね。属性関連のモデルを読めば、一通り使い方が分かると思いますよ。まあ、属性周りと権限周りは、抽象化されていて理解するのが大変ではありますが…。
$as = AttributeSet::getByHandle('personal_information');
$attribs = $as->getAttributeKeys();
if (count($attribs) > 0) {
$af = Loader::helper('form/attribute');
foreach($attribs as $ak) {
if ($ak->isAttributeKeyEditableOnRegister() && $ak->isAttributeKeyActive()) {
echo $af->display($ak, $ak->isAttributeKeyRequiredOnRegister());
}
}
}
Your post has been saved and will be published after approval by the forum moderator.
はやみ
Re: 新規ユーザー登録のオプションを属性セット毎に出力したい
ありがとうございます!!
いろいろ読んで頑張ります。