diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php index bdc6f32a7..c99e8567d 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/users.php @@ -69,7 +69,7 @@ class Users{ * @takes $username * @return string Info: Returns a string based on if the username is valid, if valid then "success" is returned */ - public function checkUser( $username ) + private function checkUser( $username ) { if ( isset( $username ) ){ if ( strlen( $username ) > 12 ){ @@ -89,6 +89,31 @@ class Users{ return "fail"; } + /** + * Function checkUserAlreadyExists + * + * @takes $username + * @return string Info: Returns true or false if the user is in the lib+shard db. + * + private function checkUserAlreadyExists( $username ) + { + global $cfg; + $dbl = new DBLayer($cfg['db']['lib']); + $dbs = new DBLayer($cfg['db']['shard']); + try{ + if ($this->dbl->execute("SELECT * FROM user WHERE Login = :name",array('name' => $username))->rowCount()){ + return true; + } + if ($this->dbs->execute("SELECT * FROM user WHERE Login = :name",array('name' => $username))->rowCount()){ + return true; + } + return false; + }catch (PDOException $e) { + //in case one of them is offline let it be hanled lateron with the + return true; + } + }*/ + /** * Function checkPassword @@ -96,7 +121,7 @@ class Users{ * @takes $pass * @return string Info: Returns a string based on if the password is valid, if valid then "success" is returned */ - public function checkPassword( $pass ) + private function checkPassword( $pass ) { if ( isset( $pass ) ){ if ( strlen( $pass ) > 20 ){ @@ -119,7 +144,7 @@ class Users{ * @takes $pass * @return string Info: Verify's $_POST["Password"] is the same as $_POST["ConfirmPass"] */ - public function confirmPassword($pass_result) + private function confirmPassword($pass_result) { if ( ( $_POST["Password"] ) != ( $_POST["ConfirmPass"] ) ){ return "Passwords do not match."; @@ -140,7 +165,7 @@ class Users{ * @takes $email * @return */ - public function checkEmail( $email ) + private function checkEmail( $email ) { if ( isset( $email ) ){ if ( !Users::validEmail( $email ) ){ @@ -164,7 +189,7 @@ class Users{ * @takes $email * @return true or false depending on if its a valid email format. */ - public function validEmail( $email ){ + private function validEmail( $email ){ $isValid = true; $atIndex = strrpos( $email, "@" ); if ( is_bool( $atIndex ) && !$atIndex ){ @@ -256,7 +281,7 @@ class Users{ * @takes $array with name,pass and mail * @return ok if it's get correctly added to the shard, else return lib offline and put in libDB, if libDB is also offline return liboffline. */ - function createUser($values){ + public function createUser($values){ try { //make connection with and put into shard db global $cfg; @@ -277,8 +302,7 @@ class Users{ } } - } - + } } diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini index eafb7df63..c60e5a621 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/en.ini @@ -4,6 +4,7 @@ [home] [userlist] +userlist_info = "welcome to the userlist" [login] login_info = "Please login with your Username and Password." diff --git a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini index 1e186ec0f..432845f91 100644 --- a/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini +++ b/code/ryzom/tools/server/ryzom_ams/ams_lib/translations/fr.ini @@ -4,6 +4,7 @@ [home] [userlist] +userlist_info = "bienvenue sur le userlist page!" [login] login_info = "S'il vous plait vous connecter avec votre nom d'utilisateur et mot de passe." diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css b/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css index d4688a89d..28e29141f 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css +++ b/code/ryzom/tools/server/ryzom_ams/www/html/css/custom.css @@ -19,3 +19,10 @@ .navbar { border-bottom: 0px; } + +.flags { + display: block; + position:relative; + left:290px; + top:28px; +} \ No newline at end of file diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/img/en.png b/code/ryzom/tools/server/ryzom_ams/www/html/img/en.png new file mode 100644 index 000000000..6505dc41b Binary files /dev/null and b/code/ryzom/tools/server/ryzom_ams/www/html/img/en.png differ diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/img/fr.png b/code/ryzom/tools/server/ryzom_ams/www/html/img/fr.png new file mode 100644 index 000000000..60ed561d4 Binary files /dev/null and b/code/ryzom/tools/server/ryzom_ams/www/html/img/fr.png differ diff --git a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl index 075190b64..bfa20ee41 100644 --- a/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl +++ b/code/ryzom/tools/server/ryzom_ams/www/html/templates/layout.tpl @@ -101,10 +101,14 @@