Try to be consistant with my Wordpress assigned slug swg-auth

This commit is contained in:
Tekaoh
2020-04-14 19:14:29 -04:00
parent e34830a0ec
commit fc7c134b38
4 changed files with 10 additions and 10 deletions

View File

@@ -1,9 +1,9 @@
# SWG Authentication for Wordpress
# Usage:
1. Upload the plugin files to the `wp-content/plugins/swgauth/` directory or install the plugin through the WordPress admin panel.
1. Upload the plugin files to the `wp-content/plugins/swg-auth/` directory or install the plugin through the WordPress admin panel.
2. Activate the plugin through the Wordpress admin panel.
3. Point your SWG server's externalAuthURL config flag to `http://url.to.wordpress/?action=swgauth`.
3. Point your SWG server's externalAuthURL config flag to `http://url.to.wordpress/?action=swg-auth`.
4. Done!
# Notes:

View File

Before

Width:  |  Height:  |  Size: 957 KiB

After

Width:  |  Height:  |  Size: 957 KiB

View File

@@ -17,9 +17,9 @@ If you're running a Star Wars Galaxies server, now you can use Wordpress to allo
== Installation ==
1. Upload the plugin files to the `wp-content/plugins/swgauth/` directory or install the plugin through the WordPress admin panel.
1. Upload the plugin files to the `wp-content/plugins/swg-auth/` directory or install the plugin through the WordPress admin panel.
2. Activate the plugin through Wordpress admin panel.
3. Point your SWG server's externalAuthURL config flag to `http://url.to.wordpress/?action=swgauth`.
3. Point your SWG server's externalAuthURL config flag to `http://url.to.wordpress/?action=swg-auth`.
4. Done!
== Frequently Asked Questions ==

View File

@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: SWG Auth
* Plugin URI: https://tekaohswg.github.io/swgauth-wordpress.html
* Plugin URI: https://tekaohswg.github.io/swg-auth-wordpress.html
* Description: Star Wars Galaxies Authentication for Wordpress
* Version: 0.1
* Author: Tekaoh
@@ -14,11 +14,11 @@ if(!defined('ABSPATH')){
}
// Run when Wordpress is loaded
add_action('wp_loaded', 'swgauth_run');
add_action('wp_loaded', 'swg_auth_run');
function swgauth_run(){
// Check if the swgauth action is requested
if($_GET['action'] == 'swgauth'){
function swg_auth_run(){
// Check if the swg-auth action is requested
if($_GET['action'] == 'swg-auth'){
// Check if a user_name and user_password are provided
if($_POST['user_name'] && $_POST['user_password']){
// Ask Wordpress to authenticate the user_name and user_password
@@ -36,7 +36,7 @@ function swgauth_run(){
// Once we've responded, we don't want Wordpress to continue
die;
}
// If we're here, the swgauth action was requested but no user_name and user_password were provided. That's weird... Don't return anything
// If we're here, the swg-auth action was requested but no user_name and user_password were provided. That's weird... Don't return anything
die;
}
}