40 public function run() {
41 if ( !$this->params[
'options'] ) {
45 $user = User::newFromId( $this->params[
'userId'] );
46 $user->load( IDBAccessObject::READ_EXCLUSIVE );
47 if ( !$user->isNamed() ) {
51 $userOptionsManager = MediaWikiServices::getInstance()
52 ->getUserOptionsManager();
53 foreach ( $this->params[
'options'] as $name => $value ) {
54 $userOptionsManager->setOption( $user, $name, $value );
57 $user->saveSettings();