Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/log1x/acf-encrypted-password

A better ACF Password Field that is encrypted using bcrypt.
https://github.com/log1x/acf-encrypted-password

acf custom fields wordpress wordpress-plugin

Last synced: 24 days ago
JSON representation

A better ACF Password Field that is encrypted using bcrypt.

Awesome Lists containing this project

README

        

# ACF Encrypted Password

[![Packagist](https://img.shields.io/packagist/v/log1x/acf-encrypted-password.svg?style=flat-square)](https://packagist.org/packages/log1x/acf-encrypted-password)
[![Packagist Downloads](https://img.shields.io/packagist/dt/log1x/acf-encrypted-password.svg?style=flat-square)](https://packagist.org/packages/log1x/acf-encrypted-password)

This is a simple ACF field to use in place of the default Password field to encrypt the password stored in the database using PHP 5.5's `password_hash()` function.

## Requirements

* PHP >= 7
* ACF >= 5

## Installation

```bash
$ composer require log1x/acf-encrypted-password
```

## Usage

You can verify the password using PHP 5.5's `password_verify()` function like so:

```php
$input = $_GET['password'];
$hash = get_field('password');

if (password_verify($input, $hash)) {
echo 'Correct';
} else {
echo 'Incorrect';
}
```