setting user attribute programmatically - multiple selects
Permalink
Hi, I have a user attribute called 'colors'. It is a 'select' attribute with "allow multiple values" to be selected... I can access this attribute via:
I want to be able to set this attribute programmatically with multiple values... The values for the attribute are black, white, grey, blue, green, yellow, orange & red.
I can set the attribute for one value using:
but I cannot find a way to set ALL of the colours...
Can anyone help me out?
Thanks
$colors = $ui->getAttribute('colours');
I want to be able to set this attribute programmatically with multiple values... The values for the attribute are black, white, grey, blue, green, yellow, orange & red.
I can set the attribute for one value using:
$ui->setAttribute('colours', 'blue');
but I cannot find a way to set ALL of the colours...
Can anyone help me out?
Thanks