Commit 310231c1 authored by David Seaward's avatar David Seaward

Merge branch 'master' into 'master'

Change internal name of the plugin to match the new repo name;

See merge request !1
parents 57181a65 8c968bc9
Pipeline #3424 passed with stage
in 25 seconds
# purism-username-policy
# Purism's username polivy for wordpress
This is a Wordpress plugin that implements rules for usernames of the liberty platform.
\ No newline at end of file
[![pipeline status](https://source.puri.sm/liberty/ldh_wp_username_policy/badges/master/pipeline.svg)](https://source.puri.sm/liberty/ldh_wp_username_policy/commits/master)
[![coverage report](https://source.puri.sm/liberty/ldh_wp_username_policy/badges/master/coverage.svg)](https://source.puri.sm/liberty/ldh_wp_username_policy/commits/master)
This is a Wordpress plugin that implements rules for usernames of the liberty platform. These rules are as follows:
* Remove all characters after the first "@"
* Remove all remaining non-alphanumeric characters
* If username starts with a numeral, prepend an "x"
* Set all letters to lowercase
* Other Wordpress logic should apply (e.g. avoid duplicates by adding a number)
<?php
// Silence is golden
<?php
/*
* @package Purism-Username-Policy
* @package Liberty-Username-Policy
* @version 0.1
Plugin Name: Purism's usernames policy
Plugin URI: https://source.puri.sm/liberty/internal/issues/32
Description: Wordpress creates usernames from email addresses. These could be invalid Purist usernames, for example p.Sherman. These should be autocorrected to follow Purist rules.
Author: Purism SPC
Version: 0.1
Author URI: http://www.puri.sm/
* @author Purism SPC <liberty@puri.sm>
* @license AGPL-3.0-or-later
* @link https://source.puri.sm/liberty/ldh_wp_username_policy
* @copyright Copyright 2017-2019 Purism SPC
*
* @wordpress-plugin
* Plugin Name: Purism's usernames policy
* Plugin URI: https://source.puri.sm/liberty/ldh_wp_username_policy
* Description: Wordpress creates usernames from email addresses. These could be invalid Purist usernames, for example p.Sherman. These should be autocorrected to follow Purist rules.
* Author: Purism SPC
* Version: 0.1
* Author URI: http://www.puri.sm/
* License: AGPL-3.0-or-later
*/
include 'sanitize.php';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment