ArashDev Posted July 7 Share Posted July 7 hi again my lord I wanna use below method in theme setting to get member names, Everything works fine, but after saving the settings, instead of displaying usernames, their IDs are shown in the field. <?php return new \IPS\Helpers\Form\member( "core_theme_setting_title_{$row['sc_id']}", $value, FALSE, array('multiple' => NULL), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] ); Link to comment Share on other sites More sharing options...
Management terabyte Posted July 8 Management Share Posted July 8 You're passing the $value variable directly, but you need to load the member data first: <?php $members = NULL; if ( !empty($value) ) { $members = array(); foreach( explode( ',', $value ) AS $member ) { $members[] = \IPS\Member::load( $member ); } } return new \IPS\Helpers\Form\member( "core_theme_setting_title_{$row['sc_id']}", $members, FALSE, array('multiple' => NULL), NULL, NULL, NULL, 'theme_setting_' . $row['sc_key'] ); Board Rules - Available Products - Need a Custom Work? < Don't PM me for support, post in the forum or submit a ticket from the client area instead! > Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now