src/Auth.php
public function setPasswordResetEnabled($enabled) {
		$enabled = (bool) $enabled;

		if ($this->isLoggedIn()) {
			try {
				$this->db->update(
					$this->makeTableNameComponents('users'),
					[
						'resettable' => $enabled ? 1 : 0
					],
					[
						'id' => $this->getUserId()
					]
				);
			}
			catch (Error $e) {
				throw new DatabaseError($e->getMessage());
			}
		}
		else {
			throw new NotLoggedInException();
		}
	}
public function setPasswordResetEnabled($enabled) {
		$enabled = (bool) $enabled;

		if ($this->isLoggedIn()) {
			try {
				$this->db->update(
					$this->makeTableNameComponents('users'),
					[
						'resettable' => $enabled ? 1 : 0
					],
					[
						'id' => $this->getUserId()
					]
				);
			}
			catch (Error $e) {
				throw new DatabaseError($e->getMessage());
			}
		}
		else {
			throw new NotLoggedInException();
		}
	}
public function setPasswordResetEnabled ( $ enabled ) { $ enabled = ( bool ) $ enabled ; if ( $ this -> isLoggedIn ( ) ) { try { $ this -> db -> update ( $ this -> makeTableNameComponents ( 'users' ) , [ 'resettable' => $ enabled ? 1 : 0 ] , [ 'id' => $ this -> getUserId ( ) ] ) ; } catch ( Error $ e ) { throw new DatabaseError ( $ e -> getMessage ( ) ) ; } } else { throw new NotLoggedInException ( ) ; } }
Sets whether password resets should be permitted for the account of the currently signed-in user

@param bool $enabled whether password resets should be enabled for the user's account
@throws NotLoggedInException if the user is not currently signed in
@throws AuthError if an internal problem occurred (do *not* catch)
Sets whether password resets should be permitted for the account of the currently signed - in user