lib/Fuel/Orm/Observer/UpdatedBy.php
public function before_update(Orm\Model $obj)
	{
		// If there are any relations loop through and check if any of them have been changed
		$relation_changed = false;

		foreach ($this->_relations as $relation)
		{
			if ($this->relation_changed($obj, $relation))
			{
				$relation_changed = true;
				break;
			}
		}

		if (($obj->is_changed() or $relation_changed) and $user_id = \Auth::get_user_id())
		{
			$obj->{$this->_property} = $user_id[1];
		}
	}
public function before_update(Orm\Model $obj)
	{
		// If there are any relations loop through and check if any of them have been changed
		$relation_changed = false;

		foreach ($this->_relations as $relation)
		{
			if ($this->relation_changed($obj, $relation))
			{
				$relation_changed = true;
				break;
			}
		}

		if (($obj->is_changed() or $relation_changed) and $user_id = \Auth::get_user_id())
		{
			$obj->{$this->_property} = $user_id[1];
		}
	}
public function before_update ( Orm \ Model $ obj ) { // If there are any relations loop through and check if any of them have been changed $ relation_changed = false ; foreach ( $ this -> _relations as $ relation ) { if ( $ this -> relation_changed ( $ obj , $ relation ) ) { $ relation_changed = true ; break ; } } if ( ( $ obj -> is_changed ( ) or $ relation_changed ) and $ user_id = \ Auth :: get_user_id ( ) ) { $ obj -> { $ this -> _property } = $ user_id [ 1 ] ; } }
Sets the UpdatedBy property to the current user id

@param Model Model object subject of this observer method
Sets the UpdatedBy property to the current user id