src/database/Postgres.php 1 location
|
@@ 8240-8249 (lines=10) @@
|
8237 |
|
* |
8238 |
|
* @return \PHPPgAdmin\Database\A 0 success |
8239 |
|
*/ |
8240 |
|
public function changePassword($rolename, $password) |
8241 |
|
{ |
8242 |
|
$enc = $this->_encryptPassword($rolename, $password); |
8243 |
|
$this->fieldClean($rolename); |
8244 |
|
$this->clean($enc); |
8245 |
|
|
8246 |
|
$sql = "ALTER ROLE \"{$rolename}\" WITH ENCRYPTED PASSWORD '{$enc}'"; |
8247 |
|
|
8248 |
|
return $this->execute($sql); |
8249 |
|
} |
8250 |
|
|
8251 |
|
/** |
8252 |
|
* Adds a group member. |
src/database/Postgres80.php 1 location
|
@@ 153-162 (lines=10) @@
|
150 |
|
* |
151 |
|
* @return \PHPPgAdmin\Database\A 0 success |
152 |
|
*/ |
153 |
|
public function changePassword($username, $password) |
154 |
|
{ |
155 |
|
$enc = $this->_encryptPassword($username, $password); |
156 |
|
$this->fieldClean($username); |
157 |
|
$this->clean($enc); |
158 |
|
|
159 |
|
$sql = "ALTER USER \"{$username}\" WITH ENCRYPTED PASSWORD '{$enc}'"; |
160 |
|
|
161 |
|
return $this->execute($sql); |
162 |
|
} |
163 |
|
|
164 |
|
// View functions |
165 |
|
|