Browse Source

Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19

Julio Montoya 10 years ago
parent
commit
fd2e4fd5df
1 changed files with 3 additions and 1 deletions
  1. 3 1
      main/auth/profile.php

+ 3 - 1
main/auth/profile.php

@@ -155,7 +155,9 @@ if (api_get_setting('profile', 'login') !== 'true') {
 $form->applyFilter('username', 'stripslashes');
 $form->applyFilter('username', 'trim');
 $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
-$form->addRule('username', get_lang('UsernameWrong'), 'username');
+if (api_get_setting('login_is_email') != 'true'){
+    $form->addRule('username', get_lang('UsernameWrong'), 'username');
+}
 $form->addRule('username', get_lang('UserTaken'), 'username_available', $user_data['username']);
 
 //    OFFICIAL CODE