From 7f17a332cc5fb3d8db4584917936d2ce782f558d Mon Sep 17 00:00:00 2001 From: Joe Bordes Date: Sun, 21 Nov 2021 20:22:08 +0100 Subject: [PATCH] doc(App) function headers --- include/Webservices/ChangePassword.php | 8 ++++---- modules/Users/Users.php | 17 +++++++---------- vtlib/Vtiger/Utils/StringTemplate.php | 6 +++--- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/include/Webservices/ChangePassword.php b/include/Webservices/ChangePassword.php index b235f78b48..59b1048363 100644 --- a/include/Webservices/ChangePassword.php +++ b/include/Webservices/ChangePassword.php @@ -9,10 +9,10 @@ *********************************************************************************/ /** - * @param String web service ID - * @param String old password - * @param String new password - * @param String confirm password + * @param string web service ID + * @param string old password + * @param string new password + * @param string confirm password * @param Users curent user */ function vtws_changePassword($id, $oldPassword, $newPassword, $confirmPassword, $user) { diff --git a/modules/Users/Users.php b/modules/Users/Users.php index f168d04158..49b4b65fe2 100644 --- a/modules/Users/Users.php +++ b/modules/Users/Users.php @@ -228,9 +228,9 @@ public function loadPreferencesFromDB($value) { /** * Take an unencrypted username and password and return the encrypted password - * @return string encrypted password for storage in DB and comparison against DB password. - * @param string $user_name - Must be non null and at least 2 characters - * @param string $user_password - Must be non null and at least 1 character. + * @param string user password - Must be non null and at least 1 character + * @param string encryption type + * @return string encrypted password for storage in DB and comparison against DB password */ public function encrypt_password($user_password, $crypt_type = '') { // encrypt the password. @@ -241,15 +241,13 @@ public function encrypt_password($user_password, $crypt_type = '') { $crypt_type = $this->get_user_crypt_type(); } - // For more details on salt format look at: http://in.php.net/crypt if ($crypt_type == 'MD5') { $salt = '$1$' . $salt . '$'; } elseif ($crypt_type == 'BLOWFISH') { $salt = '$2$' . $salt . '$'; } elseif ($crypt_type == 'PHP5.3MD5') { - //only change salt for php 5.3 or higher version for backward - //compactibility. - //crypt API is lot stricter in taking the value for salt. + //only change salt for php 5.3 or higher version for backward compatibility + //crypt API is lot stricter in taking the value for salt $salt = '$1$' . str_pad($salt, 9, '0'); } return crypt($user_password, $salt); @@ -520,9 +518,8 @@ public function get_user_crypt_type() { /** * Verify that the current password is correct and write the new password to the database - * @param string $user name - Must be non null and at least 1 character - * @param string $user_password - Must be non null and at least 1 character - * @param string $new_password - Must be non null and at least 1 character + * @param string current password + * @param string new password * @return boolean If passwords pass verification and query succeeds, return true, else return false */ public function change_password($user_password, $new_password, $dieOnError = true) { diff --git a/vtlib/Vtiger/Utils/StringTemplate.php b/vtlib/Vtiger/Utils/StringTemplate.php index f776e438c8..8531e97342 100644 --- a/vtlib/Vtiger/Utils/StringTemplate.php +++ b/vtlib/Vtiger/Utils/StringTemplate.php @@ -70,9 +70,9 @@ public function clear($exceptvars = false) { /** * Merge the given file with variable values assigned. - * @param $instring input string template - * @param $avoidLookup should be true if only verbatim file copy needs to be done - * @returns merged contents + * @param string input string template + * @param boolean should be true if only verbatim file copy needs to be done + * @return string merged contents */ public function merge($instring, $avoidLookup = false) { if (empty($instring)) {