Sets a property for current user
14933
private function setUserData($property, $value)
    {
        $auth = $this->authFactory->newInstance();
        $userData = $auth->getUserData();
        if(!$userData) {
            return;
        }
        $userData[$property] = $value;
        $auth->setUserData($userData);
    }
149900
def set_properties(self, properties):
        """"""
        if isinstance(properties, dict):
            self.properties = properties
            self.sync_properties()
        else:
            self.text = properties
941725
public void setProperty(String strName, String strData)
    {
        Record recUserRegistration = this.getUserRegistration();
        ((PropertiesField)recUserRegistration.getField(UserRegistrationModel.PROPERTIES)).setProperty(strName, strData);
    }
172698
public function modifyProperty($user, $newValue, $property = self::LOGIN_PROPERTY)
    {
        $this->checkProperty($property, true);

        $propertyObject = $this->properties[$property];
        if (is_string($propertyObject)) {
            $this->properties[$property] = $propertyObject = new ReflectionProperty($user, $propertyObject);
        }

        $propertyObject->setAccessible(true);
        $propertyObject->setValue($user, $newValue);

        $oid = spl_object_hash($user);
        if (!array_key_exists($oid, $this->lazyValueCache)) {
            $this->lazyValueCache[$oid] = array();
        }

        $this->lazyValueCache[$oid][$property] = $newValue;
    }
551465
def get_user(self, userPk):
        """"""
        r = self._request('user/' + str(userPk))
        if r:
            # Set base properties and copy data inside the user
            u = User()
            u.pk = u.id = userPk
            u.__dict__.update(r.json())
            return u
        return None
741090
protected function setUserFromSession()
    {
        $id = $this->session->get();

        if ($id) {
            $user = $this->repository->getById($this->session->get());
            if ($user instanceof UserInterface) {
                $this->admitUser($user);
                return;
            }
        }

        $this->currentUser = new GuestUser();
    }
1218399
def _set(self, name, value):
        
        if value is not UNSET:
            if isinstance(value, Slotted):
                current = getattr(self, name, UNSET)
                if current is None or current is UNSET:
                    current = value.__class__()
                    current.set(value)
                    setattr(self, name, current)
                    return
                if isinstance(current, Slotted):
                    current.set(value)
                    return
            setattr(self, name, value)
1033215
function(userId, properties, callback) {
      if (!userId) return callback(new Error(utils.i18n.identities.id));
      utils.debug('Identity edit: ' + userId);

      request.patch({
        path: '/users/' + userId + '/identity',
        body: Object.keys(properties).map(function(propertyName) {
          return {
            operation: 'set',
            property: propertyName,
            value: properties[propertyName]
          };
        })
      }, callback || utils.nop);
    }
688953
function(name, property) {
                let props = name.split('.');
                let lastProp = props.pop();
                let ops = __CONFIG;
                props.forEach(prop => {
                    if (!ops[prop]) {
                        ops[prop] = {};
                    }
                    ops = ops[prop];
                });
                ops[lastProp] = property;
            }
337724
public void setOwner(ListenerOwner owner)
    {
        super.setOwner(owner);
        if (owner != null)
        {
            Record recUserInfo = this.getOwner();
            RecordOwner recordOwner = recUserInfo.getRecordOwner();
            Record recUserScreenRecord = (Record)recordOwner.getScreenRecord();
            // This will flag the password as changed:
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
            recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true));
        }
    }
867405
public function setCurrentUser($currentUser)
    {
        $this->currentUser = $currentUser;
        if ($this->currentUser) {
            // removes stored user as it's now useless
            $this->user = null;
        }
    }
802628
def currentUser(extras=nil)
      method = 'currentUser'
      type = User
      args = {}
      args[:extras] = extras if extras
      return_object type,method,args,true
    end
340008
function User(data){
    var self = this;
    Object.keys(data).map(function(k){
      self[k] = data[k];
    });
  }
400208
def _maybe_update(self, user, attribute, new_value):
        
        old_value = getattr(user, attribute)
        if new_value != old_value:
            self.stderr.write(
                _('Setting {attribute} for user "{username}" to "{new_value}"').format(
                    attribute=attribute, username=user.username, new_value=new_value
                )
            )
            setattr(user, attribute, new_value)
391858
def set_property(self, prop, objects):
        """"""
        self._properties.add(prop)
        objects = set(objects)
        self._objects |= objects
        pairs = self._pairs
        for o in self._objects:
            if o in objects:
                pairs.add((o, prop))
            else:
                pairs.discard((o, prop))
914210
function setUserRecord(state, userRecord) {
  Object.defineProperty(state, 'userRecord',
    {value: userRecord, writable: true, configurable: true, enumerable: false});
}
1298225
def get_current_user(self, objectmask=None):
        """"""

        if objectmask is None:
            objectmask = "mask[userStatus[name], parent[id, username]]"
        return self.account_service.getCurrentUser(mask=objectmask)