Override the save method to save the first and last name to the user
        field.
431791
def save(self):
        
        # First save the parent form and get the user.
        new_user = super(SignupFormExtra, self).save()

        new_user.first_name = self.cleaned_data['first_name']
        new_user.last_name = self.cleaned_data['last_name']
        new_user.save()

        # Userena expects to get the new user from this form, so return the new
        # user.
        return new_user
1287371
def set_name(self,name=None):
        
        if name:
            self.name = name[:254]
        else:
            self.name = self.extract_name()[:254]

        self.save()

        return self.name
700122
def save(self):
        
        while True:
            username = sha1(str(random.random()).encode('utf-8')).hexdigest()[:5]
            try:
                get_user_model().objects.get(username__iexact=username)
            except get_user_model().DoesNotExist: break

        self.cleaned_data['username'] = username
        return super(SignupFormOnlyEmail, self).save()
1273604
def pre_save(self, model_instance, add):
        """"""
        value = socket.gethostname()
        setattr(model_instance, self.attname, value)
        return value
915941
def save(self):
        
        ret = False

        # we will only use the primary key if it hasn't been modified
        pk = None
        if self.schema.pk.name not in self.modified_fields:
            pk = self.pk

        if pk:
            ret = self.update()
        else:
            ret = self.insert()

        return ret
386871
def override(self, obj):
        """"""
        for field in obj.__class__.export_fields:
            setattr(self, field, getattr(obj, field))
1123073
private static synchronized void storeSingleton() {
        // recheck that we need to run because field could have been
        // set since we decided to invoke this method but before we acquired
        // the lock on this object
        if (PERSON_DIR_NAME_FINDER_INSTANCE == null) {
            IPersonAttributeDao personAttributeDao =
                    PersonAttributeDaoLocator.getPersonAttributeDao();
            PERSON_DIR_NAME_FINDER_INSTANCE = new PersonDirNameFinder(personAttributeDao);
        }
    }
299614
public function actionUserNameToFirstName()
    {
        if (!CmsUser::find()->count()) {
            $this->stdout("Content not found!\n", Console::BOLD);
            return;
        }

        $this->stdout("1. Cms user name normalize!\n", Console::FG_YELLOW);

        /**
         * @var CmsUser $cmsUser
         */
        foreach (CmsUser::find()->orderBy(['id' => SORT_ASC])->each(10) as $cmsUser) {
            $this->stdout("\t User: {$cmsUser->id}\n", Console::FG_YELLOW);

            if (!$cmsUser->_to_del_name) {
                $this->stdout("\t NOT found property: _to_del_name\n", Console::FG_YELLOW);
                continue;
            }

            $name = $cmsUser->_to_del_name;
            $nameData = explode(" ", $name);

            if (isset($nameData[0])) {
                $cmsUser->first_name = trim($nameData[0]);
            }

            if (isset($nameData[1])) {
                $cmsUser->last_name = trim($nameData[1]);
            }

            if (isset($nameData[2])) {
                $cmsUser->patronymic = trim($nameData[2]);
            }


            if ($cmsUser->save()) {
                $this->stdout("\t Updated name: {$cmsUser->name}\n", Console::FG_GREEN);
            } else {
                $this->stdout("\t NOT updated name: {$cmsUser->id}\n", Console::FG_RED);
            }
        }
    }
408314
def lastname(self, value, case, gender=None):
        
        """
        if not value:
            raise ValueError('Lastname cannot be empty.')

        return self.__inflect(value, case, 'lastname', gender)
676554
def populate_username(self, request, user):
        
        from .utils import user_username, user_email, user_field
        first_name = user_field(user, 'first_name')
        last_name = user_field(user, 'last_name')
        email = user_email(user)
        username = user_username(user)
        if app_settings.USER_MODEL_USERNAME_FIELD:
            user_username(
                user,
                username or self.generate_unique_username([
                    first_name,
                    last_name,
                    email,
                    username,
                    'user']))
103878
def saveToObject(self):
        """"""
        details = self._component.auto_details()
        for field, widget in self.inputWidgets.items():
            self._component.set(field, widget.value())
        self.attributesSaved.emit(self._component.__class__.__name__, self._component.stateDict())
98834
def save(self, *args, **kwargs):
		
		# Now in UTC
		now_datetime = timezone.now()

		# If we are in a creation, assigns creation_datetime
		if not self.id:
			self.creation_datetime = now_datetime

		# Las update datetime is always updated
		self.last_update_datetime = now_datetime
		
		# Current user is creator
		# (get current user with django-cuser middleware)
		self.creator_user = None
		current_user = CuserMiddleware.get_user()
		if not current_user is None and not current_user.is_anonymous():
			self.creator_user_id = current_user.id
		
		# Parent constructor call
		super(FieldTranslation, self).save(*args, **kwargs)
547612
def save(self, obj):
        """"""
        if not obj.id:
            obj.id = uuid()

        stored_data = {
            'id': obj.id,
            'value': obj.to_data()
        }

        index_vals = obj.indexes() or {}
        for key in obj.__class__.index_names() or []:
            val = index_vals.get(key, '')
            stored_data[key] = DynamoMappings.map_index_val(val)

        table = self.get_class_table(obj.__class__)
        item = Item(table, data=stored_data)

        item.save(overwrite=True)
136762
def _save_entry_field(self, field_type, entry):
        """"""

        if field_type == 0x0000:
            # Ignored
            pass
        elif field_type == 0x0001:
            if entry.uuid is not None:
                return (16, entry.uuid)
        elif field_type == 0x0002:
            if entry.group_id is not None:
                return (4, struct.pack('<I', entry.group_id))
        elif field_type == 0x0003:
            if entry.image is not None:
                return (4, struct.pack('<I', entry.image))
        elif field_type == 0x0004:
            if entry.title is not None:
                return (len(entry.title.encode())+1,
                         (entry.title+'\0').encode())
        elif field_type == 0x0005:
            if entry.url is not None:
                return (len(entry.url.encode())+1, (entry.url+'\0').encode())
        elif field_type == 0x0006:
            if entry.username is not None:
                return (len(entry.username.encode())+1,
                        (entry.username+'\0').encode())
        elif field_type == 0x0007:
            if entry.password is not None:
                return (len(entry.password.encode())+1,
                        (entry.password+'\0').encode())
        elif field_type == 0x0008:
            if entry.comment is not None:
                return (len(entry.comment.encode())+1,
                       (entry.comment+'\0').encode())
        elif field_type == 0x0009:
            if entry.creation is not None:
                return (5, self._pack_date(entry.creation))
        elif field_type == 0x000A:
            if entry.last_mod is not None:
                return (5, self._pack_date(entry.last_mod))
        elif field_type == 0x000B:
            if entry.last_access is not None:
                return (5, self._pack_date(entry.last_access))
        elif field_type == 0x000C:
            if entry.expire is not None:
                return (5, self._pack_date(entry.expire))
        elif field_type == 0x000D:
            if entry.binary_desc is not None:
                return (len(entry.binary_desc.encode())+1,
                        (entry.binary_desc+'\0').encode())
        elif field_type == 0x000E:
            if entry.binary is not None:
                return (len(entry.binary), entry.binary)
        return False
1293135
def save_model(self, request, obj, form, change):
        """"""
        obj._history_user = request.user
        super(SimpleHistoryAdmin, self).save_model(request, obj, form, change)
1354638
def user_field_create(self, data, **kwargs):
        ""
        api_path = "/api/v2/user_fields.json"
        return self.call(api_path, method="POST", data=data, **kwargs)
1133019
function() {
		if(this.options.name) {
			for(var i = 0 ; i < this.subFields.length ; i++) {
				var subFieldEl = this.subFields[i];
				subFieldEl.setFieldName(this.options.name+"["+i+"]");
			}
		}
	}