1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #include "User.hxx"
11 
12 using namespace ::connectivity;
13 using namespace ::connectivity::firebird;
14 using namespace ::connectivity::sdbcx;
15 
16 using namespace ::com::sun::star;
17 using namespace ::com::sun::star::sdbc;
18 
User(const css::uno::Reference<css::sdbc::XConnection> & rConnection)19 User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection):
20     OUser(true) // Case Sensitive
21     , m_xConnection(rConnection)
22 {}
23 
User(const css::uno::Reference<css::sdbc::XConnection> & rConnection,const OUString & rName)24 User::User(const css::uno::Reference< css::sdbc::XConnection >& rConnection, const OUString& rName):
25     OUser(rName,
26           true) // Case Sensitive
27     , m_xConnection(rConnection)
28 {}
29 
changePassword(const OUString &,const OUString & newPassword)30 void User::changePassword(const OUString&, const OUString& newPassword)
31 {
32     m_xConnection->createStatement()->execute("ALTER USER " + m_Name + " PASSWORD '" + newPassword + "'");
33 }
34 
35 //----- IRefreshableGroups ----------------------------------------------------
refreshGroups()36 void User::refreshGroups()
37 {
38     // TODO: implement.
39 }
40