Code Duplication    Length = 10-10 lines in 2 locations

src/database/databasetraits/RoleTrait.php 1 location

@@ 685-694 (lines=10) @@
682
     *
683
     * @return int 0 if operation was successful
684
     */
685
    public function changePassword($rolename, $password)
686
    {
687
        $enc = $this->_encryptPassword($rolename, $password);
688
        $this->fieldClean($rolename);
689
        $this->clean($enc);
690
691
        $sql = "ALTER ROLE \"{$rolename}\" WITH ENCRYPTED PASSWORD '{$enc}'";
692
693
        return $this->execute($sql);
694
    }
695
696
    /**
697
     * Adds a group member.

src/database/Postgres80.php 1 location

@@ 160-169 (lines=10) @@
157
     *
158
     * @return int 0 if operation was successful
159
     */
160
    public function changePassword($username, $password)
161
    {
162
        $enc = $this->_encryptPassword($username, $password);
163
        $this->fieldClean($username);
164
        $this->clean($enc);
165
166
        $sql = "ALTER USER \"{$username}\" WITH ENCRYPTED PASSWORD '{$enc}'";
167
168
        return $this->execute($sql);
169
    }
170
171
    // View functions
172