Changeset - ddb797fdf23b
[Not reviewed]
0 2 0
HanzZ - 14 years ago 2011-08-24 00:35:34
hanzz.k@gmail.com
Do not create users entry in getPassword
2 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
include/transport/userregistry.h
Show inline comments
 
@@ -86,7 +86,7 @@ class UserRegistry : public Swift::UserRegistry {
 

	
 
		/// Returns current password for particular user
 
		/// \param barejid JID.
 
		const std::string &getUserPassword(const std::string &barejid);
 
		const std::string getUserPassword(const std::string &barejid);
 

	
 
		/// Emitted when user wants to connect legacy network to validate the password.
 
		boost::signal<void (const Swift::JID &user)> onConnectUser;
 
@@ -102,7 +102,6 @@ class UserRegistry : public Swift::UserRegistry {
 

	
 
		mutable std::map<std::string, Sess> users;
 
		mutable Config *config;
 
		std::string empty;
 
};
 

	
 
}
src/userregistry.cpp
Show inline comments
 
@@ -116,10 +116,10 @@ void UserRegistry::onPasswordInvalid(const Swift::JID &user) {
 
	}
 
}
 

	
 
const std::string &UserRegistry::getUserPassword(const std::string &barejid) {
 
const std::string UserRegistry::getUserPassword(const std::string &barejid) {
 
	if (users.find(barejid) != users.end())
 
		return users[barejid].password;
 
	return empty;
 
	return "";
 
}
 

	
 
}
0 comments (0 inline, 0 general)