apps/user_external/lib/smb.php
/**
	 * Check if the password is correct without logging in the user
	 *
	 * @param string $uid      The username
	 * @param string $password The password
	 *
	 * @return true/false
	 */
Check if the password is correct without logging in the user
@param string $uid      The username
@param string $password The password

@return true/false
Check if the password is correct without logging in the user @param string $uid The username @param string $password The password @return true / false
public function checkPassword($uid, $password) {
		$attemptWithInvalidPassword = $this->tryAuthentication($uid, base64_encode($password));
		if(is_string($attemptWithInvalidPassword)) {
			return false;
		}
		$attemptWithValidPassword = $this->tryAuthentication($uid, $password);
		if(is_string($attemptWithValidPassword)) {
			$this->storeUser($uid);
			return $uid;
		}
		return false;
	}
public function checkPassword ( $ uid , $ password ) { $ attemptWithInvalidPassword = $ this -> tryAuthentication ( $ uid , base64_encode ( $ password ) ) ; if ( is_string ( $ attemptWithInvalidPassword ) ) { return false ; } $ attemptWithValidPassword = $ this -> tryAuthentication ( $ uid , $ password ) ; if ( is_string ( $ attemptWithValidPassword ) ) { $ this -> storeUser ( $ uid ) ; return $ uid ; } return false ; }
Check if the password is correct without logging in the user
 @param string $uid      The username
 @param string $password The password
Check if the password is correct without logging in the user @param string $uid The username @param string $password The password
// Check with an invalid password, if the user authenticates then fail // Check with valid password