Postgres::changePassword PHP Method

changePassword() public method

Changes a role's password
public changePassword ( $rolename, $password )
$rolename The role name
$password The new password
    function changePassword($rolename, $password)
    {
        $enc = $this->_encryptPassword($rolename, $password);
        $this->fieldClean($rolename);
        $this->clean($enc);
        $sql = "ALTER ROLE \"{$rolename}\" WITH ENCRYPTED PASSWORD '{$enc}'";
        return $this->execute($sql);
    }
Postgres