1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-04 23:27:28 +02:00

Rename method 'deleteRememberDirective' in class 'Auth'

Use more expressive name 'deleteRememberDirectiveForUserById'
This commit is contained in:
Marco
2018-03-20 15:57:37 +01:00
parent 3a7a860c6d
commit 09dac6a5f5

View File

@@ -379,7 +379,7 @@ final class Auth extends UserManager {
// if a user ID was set // if a user ID was set
if (isset($userId)) { if (isset($userId)) {
// delete any existing remember directives // delete any existing remember directives
$this->deleteRememberDirective($userId); $this->deleteRememberDirectiveForUserById($userId);
} }
// remove all session variables maintained by this library // remove all session variables maintained by this library
@@ -445,7 +445,7 @@ final class Auth extends UserManager {
* @param int $userId the user ID that shouldn't be kept signed in anymore * @param int $userId the user ID that shouldn't be kept signed in anymore
* @throws AuthError if an internal problem occurred (do *not* catch) * @throws AuthError if an internal problem occurred (do *not* catch)
*/ */
private function deleteRememberDirective($userId) { private function deleteRememberDirectiveForUserById($userId) {
try { try {
$this->db->delete( $this->db->delete(
$this->dbTablePrefix . 'users_remembered', $this->dbTablePrefix . 'users_remembered',
@@ -718,7 +718,7 @@ final class Auth extends UserManager {
$newPassword = self::validatePassword($newPassword); $newPassword = self::validatePassword($newPassword);
$userId = $this->getUserId(); $userId = $this->getUserId();
$this->updatePasswordInternal($userId, $newPassword); $this->updatePasswordInternal($userId, $newPassword);
$this->deleteRememberDirective($userId); $this->deleteRememberDirectiveForUserById($userId);
} }
else { else {
throw new NotLoggedInException(); throw new NotLoggedInException();
@@ -1201,7 +1201,7 @@ final class Auth extends UserManager {
$this->updatePasswordInternal($resetData['user'], $newPassword); $this->updatePasswordInternal($resetData['user'], $newPassword);
// delete any remaining remember directives // delete any remaining remember directives
$this->deleteRememberDirective($resetData['user']); $this->deleteRememberDirectiveForUserById($resetData['user']);
try { try {
$this->db->delete( $this->db->delete(