Changeset 2818593
- Timestamp:
- 11/15/2022 11:05:50 PM (3 years ago)
- Location:
- hngamers-atavism-user-verification
- Files:
-
- 6 edited
- 1 copied
-
tags/0.0.4 (copied) (copied from hngamers-atavism-user-verification/trunk)
-
tags/0.0.4/atavism-verify.php (modified) (1 diff)
-
tags/0.0.4/readme.txt (modified) (1 diff)
-
tags/0.0.4/templates/hngamers-atavism-verify-user.php (modified) (4 diffs)
-
trunk/atavism-verify.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/templates/hngamers-atavism-verify-user.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hngamers-atavism-user-verification/tags/0.0.4/atavism-verify.php
r2803598 r2818593 12 12 * Plugin URI: https://hngamers.com/courses/development/atavism/atavism-wordpress-cms/ 13 13 * Description: This is the user verification plugin for the HNG Core Atavism series and allows users to verify and log into the game server from the wordpress logins. 14 * Version: 0.0. 314 * Version: 0.0.4 15 15 * Author: thevisad 16 16 * Author URI: https://hngamers.com/ -
hngamers-atavism-user-verification/tags/0.0.4/readme.txt
r2803598 r2818593 3 3 Tags: user verification, atavism online 4 4 Requires at least: 5.2 5 Tested up to: 6. 05 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 Stable tag: 0.0. 37 Stable tag: 0.0.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
hngamers-atavism-user-verification/tags/0.0.4/templates/hngamers-atavism-verify-user.php
r2803598 r2818593 78 78 } 79 79 80 function hngamers_atavism_user_verify_check_mysql_error($str) { 81 die("ERROR: ".$str); 82 } 83 80 84 function hngamers_atavism_user_verify_check_wordpress_user($usernamePost, $userPassword) { 81 85 //https://developer.wordpress.org/reference/functions/get_option/ … … 87 91 $options[ 'hngamers_atavism_master_db_schema_string' ], 88 92 $options[ 'hngamers_atavism_master_db_port_string' ] 89 ) ;93 ) or hngamers_atavism_user_verify_check_mysql_error(mysqli_error($sel_db)); 90 94 91 95 if (VerifyWordPressUser($usernamePost)) { … … 100 104 if(!mysqli_num_rows($result)) { 101 105 echo(esc_html(trim($user->ID))); 102 } 106 } else 107 { 108 // Database issue 109 echo(esc_html( '-4' )); 110 } 103 111 104 112 foreach ($result as $data) { 105 113 if ( empty( $data['status'] ) ) { 106 echo(esc_html( '-1, user banned' ));107 e xit();114 // banned 115 echo(esc_html( '-2' )); 108 116 } else { 117 // return the users ID 109 118 echo(esc_html(trim($user->ID))); 110 119 } … … 112 121 } 113 122 else { 114 echo(esc_html( '-1 , wrong pass' ));123 echo(esc_html( '-1' )); 115 124 } 116 }else{ 117 echo(esc_html( '-1, user not found' )); 125 } 126 else 127 { 128 echo(esc_html( '-3' )); 118 129 } 119 130 } 120 131 else 121 132 { 122 echo(esc_html( '- 1, user not found' ));133 echo(esc_html( '-3' )); 123 134 } 124 135 } -
hngamers-atavism-user-verification/trunk/atavism-verify.php
r2803598 r2818593 12 12 * Plugin URI: https://hngamers.com/courses/development/atavism/atavism-wordpress-cms/ 13 13 * Description: This is the user verification plugin for the HNG Core Atavism series and allows users to verify and log into the game server from the wordpress logins. 14 * Version: 0.0. 314 * Version: 0.0.4 15 15 * Author: thevisad 16 16 * Author URI: https://hngamers.com/ -
hngamers-atavism-user-verification/trunk/readme.txt
r2803598 r2818593 3 3 Tags: user verification, atavism online 4 4 Requires at least: 5.2 5 Tested up to: 6. 05 Tested up to: 6.1.1 6 6 Requires PHP: 5.6 7 Stable tag: 0.0. 37 Stable tag: 0.0.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
hngamers-atavism-user-verification/trunk/templates/hngamers-atavism-verify-user.php
r2803598 r2818593 78 78 } 79 79 80 function hngamers_atavism_user_verify_check_mysql_error($str) { 81 die("ERROR: ".$str); 82 } 83 80 84 function hngamers_atavism_user_verify_check_wordpress_user($usernamePost, $userPassword) { 81 85 //https://developer.wordpress.org/reference/functions/get_option/ … … 87 91 $options[ 'hngamers_atavism_master_db_schema_string' ], 88 92 $options[ 'hngamers_atavism_master_db_port_string' ] 89 ) ;93 ) or hngamers_atavism_user_verify_check_mysql_error(mysqli_error($sel_db)); 90 94 91 95 if (VerifyWordPressUser($usernamePost)) { … … 100 104 if(!mysqli_num_rows($result)) { 101 105 echo(esc_html(trim($user->ID))); 102 } 106 } else 107 { 108 // Database issue 109 echo(esc_html( '-4' )); 110 } 103 111 104 112 foreach ($result as $data) { 105 113 if ( empty( $data['status'] ) ) { 106 echo(esc_html( '-1, user banned' ));107 e xit();114 // banned 115 echo(esc_html( '-2' )); 108 116 } else { 117 // return the users ID 109 118 echo(esc_html(trim($user->ID))); 110 119 } … … 112 121 } 113 122 else { 114 echo(esc_html( '-1 , wrong pass' ));123 echo(esc_html( '-1' )); 115 124 } 116 }else{ 117 echo(esc_html( '-1, user not found' )); 125 } 126 else 127 { 128 echo(esc_html( '-3' )); 118 129 } 119 130 } 120 131 else 121 132 { 122 echo(esc_html( '- 1, user not found' ));133 echo(esc_html( '-3' )); 123 134 } 124 135 }
Note: See TracChangeset
for help on using the changeset viewer.