Add `actor` table and code to start using it
[lhc/web/wiklou.git] / includes / user / UserIdentityValue.php
index e728264..120f31f 100644 (file)
@@ -41,16 +41,24 @@ class UserIdentityValue implements UserIdentity {
         */
        private $name;
 
+       /**
+        * @var int
+        */
+       private $actor;
+
        /**
         * @param int $id
         * @param string $name
+        * @param int $actor
         */
-       public function __construct( $id, $name ) {
+       public function __construct( $id, $name, $actor ) {
                Assert::parameterType( 'integer', $id, '$id' );
                Assert::parameterType( 'string', $name, '$name' );
+               Assert::parameterType( 'integer', $actor, '$actor' );
 
                $this->id = $id;
                $this->name = $name;
+               $this->actor = $actor;
        }
 
        /**
@@ -67,4 +75,11 @@ class UserIdentityValue implements UserIdentity {
                return $this->name;
        }
 
+       /**
+        * @return int The user's actor ID. May be 0 if no actor ID has been assigned.
+        */
+       public function getActorId() {
+               return $this->actor;
+       }
+
 }