mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-10 09:19:01 +00:00
fixed more warnings
This commit is contained in:
parent
ddb06c7f8c
commit
e3c9670869
6 changed files with 9 additions and 7 deletions
|
@ -29,13 +29,15 @@ class Users{
|
|||
if ( ( $user == "success" ) and ( $pass == "success" ) and ( $cpass == "success" ) and ( $email == "success" ) and ( isset( $_POST["TaC"] ) ) ){
|
||||
return "success";
|
||||
}else{
|
||||
global $TOS_URL;
|
||||
$pageElements = array(
|
||||
//'GAME_NAME' => $GAME_NAME,
|
||||
// 'WELCOME_MESSAGE' => $WELCOME_MESSAGE,
|
||||
'USERNAME' => $user,
|
||||
'PASSWORD' => $pass,
|
||||
'CPASSWORD' => $cpass,
|
||||
'EMAIL' => $email
|
||||
'EMAIL' => $email,
|
||||
'TOS_URL' => $TOS_URL
|
||||
);
|
||||
if ( $user != "success" ){
|
||||
$pageElements['USERNAME_ERROR'] = 'TRUE';
|
||||
|
@ -344,7 +346,7 @@ class Users{
|
|||
* @param $user the inserted username
|
||||
* @param $pass the inserted password
|
||||
*/
|
||||
protected function checkLoginMatch($user,$pass){
|
||||
protected static function checkLoginMatch($user,$pass){
|
||||
print('This is the base class!');
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ class WebUsers extends Users{
|
|||
* @param $password the inserted password (unhashed)
|
||||
* @return the logged in user's db row as array if login was a success, else "fail" will be returned.
|
||||
*/
|
||||
public function checkLoginMatch($username,$password){
|
||||
public static function checkLoginMatch($username,$password){
|
||||
if(!user_authenticate($username, $password)){
|
||||
return 'fail';
|
||||
}else{
|
||||
|
|
|
@ -71,7 +71,7 @@ $cfg['crypt']['enc_method'] = 'AES-256-CBC';
|
|||
$cfg['crypt']['hash_method'] = "SHA512";
|
||||
|
||||
//terms of service url location
|
||||
$TOS_URL = variable_get('ryzommanage_TOS', 'www.mytosurlhere.com');
|
||||
$TOS_URL = variable_get('ryzommanage_TOS', 'http://www.gnu.org/licenses/agpl-3.0.html');
|
||||
//-----------------------------------------------------------------------------------------
|
||||
// If true= the server will add automatically unknown user in the database
|
||||
// (in nel.user= nel.permission= ring.ring_user and ring.characters
|
||||
|
|
|
@ -75,7 +75,7 @@ class WebUsers extends Users{
|
|||
* @param $password the inserted password (unhashed)
|
||||
* @return the logged in user's db row as array if login was a success, else "fail" will be returned.
|
||||
*/
|
||||
public function checkLoginMatch($username,$password){
|
||||
public static function checkLoginMatch($username,$password){
|
||||
|
||||
$dbw = new DBLayer("web");
|
||||
$statement = $dbw->execute("SELECT * FROM ams_user WHERE Login=:user", array('user' => $username));
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
*/
|
||||
function register(){
|
||||
global $TOS_URL;
|
||||
$pageElements['tos_url'] = $TOS_URL;
|
||||
$pageElements['TOS_URL'] = $TOS_URL;
|
||||
return $pageElements;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
isset($TAC) and $TAC eq "success"}success{else}{/if}">
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag1}<a href='{$tos_url}'>{$tac_tag2}</a>
|
||||
<input type="checkbox" class="input-xlarge" id="TaC" name="TaC" placeholder="Email">{$tac_tag1}<a href='{$TOS_URL}'>{$tac_tag2}</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue