src/snac/server/database/SQL.php
/**
     * Insert a new user aka appuser
     *
     * Insert a user into the db, returning the new record id. Field userid is not currently used.
     *
     * @param string $userName The username, unique, we initially are using email address
     * @param string $firstName The first name
     * @param string $lastName The last name
     * @param string $fullName The full name
     * @param string $avatar The avatar
     * @param string $avatarSmall The small avatar
     * @param string $avatarLarge The large avatar
     * @param string $email The email address, not unique
     * @param string $workEmail Work email address
     * @param string $workPhone Work phone number
     * @param integer $affiliationID Foreign key to ic_id of the SNAC constellation for affiliated institution
     * @param string $preferredRules Preferred descriptive name rules
     * @param boolean $active Is the user active
     * @return integer Record row id, unique, from sequence id_seq.
     */
Insert a new user aka appuser
Insert a user into the db, returning the new record id. Field userid is not currently used.


Insert a new user aka appuser Insert a user into the db returning the new record id . Field userid is not currently used .
public function insertUser($userName,
                               $firstName,
                               $lastName,
                               $fullName,
                               $avatar,
                               $avatarSmall,
                               $avatarLarge,
                               $email,
                               $workEmail,
                               $workPhone,
                               $affiliationID,
                               $preferredRules,
                               $active)
    {
        $result = $this->sdb->query(
            'insert into appuser
            (username, first, last, fullname, avatar, avatar_small, avatar_large,
            email, work_email, work_phone, affiliation, preferred_rules, active)
            values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
            returning id',
            array($userName,
                  $firstName,
                  $lastName,
                  $fullName,
                  $avatar,
                  $avatarSmall,
                  $avatarLarge,
                  $email,
                  $workEmail,
                  $workPhone,
                  $affiliationID,
                  $preferredRules,
                  $this->sdb->boolToPg($active)));
        $row = $this->sdb->fetchrow($result);
        return $row['id'];
    }
public function insertUser ( $ userName , $ firstName , $ lastName , $ fullName , $ avatar , $ avatarSmall , $ avatarLarge , $ email , $ workEmail , $ workPhone , $ affiliationID , $ preferredRules , $ active ) { $ result = $ this -> sdb -> query ( 'insert into appuser
            (username, first, last, fullname, avatar, avatar_small, avatar_large,
            email, work_email, work_phone, affiliation, preferred_rules, active)
            values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
            returning id' , array ( $ userName , $ firstName , $ lastName , $ fullName , $ avatar , $ avatarSmall , $ avatarLarge , $ email , $ workEmail , $ workPhone , $ affiliationID , $ preferredRules , $ this -> sdb -> boolToPg ( $ active ) ) ) ; $ row = $ this -> sdb -> fetchrow ( $ result ) ; return $ row [ 'id' ] ; }
Insert a new user aka appuser
 Insert a user into the db, returning the new record id.
Insert a new user aka appuser Insert a user into the db returning the new record id .