Skip to content

Commit

Permalink
doc(App) function headers
Browse files Browse the repository at this point in the history
  • Loading branch information
joebordes committed Nov 21, 2021
1 parent 0981097 commit 7f17a33
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 17 deletions.
8 changes: 4 additions & 4 deletions include/Webservices/ChangePassword.php
Expand Up @@ -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) {
Expand Down
17 changes: 7 additions & 10 deletions modules/Users/Users.php
Expand Up @@ -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.
Expand All @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions vtlib/Vtiger/Utils/StringTemplate.php
Expand Up @@ -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)) {
Expand Down

0 comments on commit 7f17a33

Please sign in to comment.