PageRenderTime 55ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/projects/compiere-330/base/src/org/compiere/util/WebLogin.java

https://gitlab.com/essere.lab.public/qualitas.class-corpus
Java | 712 lines | 480 code | 62 blank | 170 comment | 124 complexity | 6bbae67be1ff903021cc11baf7070e39 MD5 | raw file
  1. /******************************************************************************
  2. * Product: Compiere ERP & CRM Smart Business Solution *
  3. * Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
  4. * This program is free software, you can redistribute it and/or modify it *
  5. * under the terms version 2 of the GNU General Public License as published *
  6. * by the Free Software Foundation. This program is distributed in the hope *
  7. * that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
  8. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
  9. * See the GNU General Public License for more details. *
  10. * You should have received a copy of the GNU General Public License along *
  11. * with this program, if not, write to the Free Software Foundation, Inc., *
  12. * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
  13. * For the text or an alternative of this public license, you may reach us *
  14. * ComPiere, Inc., 3600 Bridge Parkway #102, Redwood City, CA 94065, USA *
  15. * or via info@compiere.org or http://www.compiere.org/license.html *
  16. *****************************************************************************/
  17. package org.compiere.util;
  18. import java.io.*;
  19. import java.util.logging.*;
  20. import javax.servlet.*;
  21. import javax.servlet.http.*;
  22. import org.compiere.model.*;
  23. /**
  24. * WebLogin provides a standard interface to login
  25. * from Webapps like WStore or CM
  26. *
  27. * @author Yves Sandfort, Jorg Janke
  28. * @version $Id$
  29. */
  30. public class WebLogin
  31. {
  32. /** Logger */
  33. private static CLogger log = CLogger.getCLogger(WebLogin.class);
  34. private final static String COOKIE_NAME = "CompiereWebUser";
  35. /** Forward Parameter */
  36. private String P_ForwardTo = "ForwardTo";
  37. /** SalesRep Parameter */
  38. private String P_SalesRep_ID = "SalesRep_ID";
  39. /** EMail Parameter */
  40. private String P_EMail = "EMail";
  41. /** Password Parameter */
  42. private String P_Password = "Password";
  43. /** Mode/Action Parameter */
  44. private String P_Action = "Mode";
  45. /** Login Page */
  46. private String m_login_page = "/login.jsp";
  47. /** Update Page */
  48. private String m_update_page = "/update.jsp";
  49. /** Message */
  50. private String m_message = null;
  51. /** Context */
  52. private Ctx m_ctx;
  53. /** HttpServletRequest */
  54. private HttpServletRequest m_request;
  55. /** HttpServletResponse */
  56. private HttpServletResponse m_response;
  57. /** HttpSession */
  58. private HttpSession m_session;
  59. /** adressConfirm */
  60. private boolean m_addressConfirm;
  61. /** forward */
  62. private String m_forward;
  63. /** SalesRep */
  64. private String m_salesRep;
  65. /** EMail */
  66. private String m_email;
  67. /** Password */
  68. private String m_password;
  69. /** WebUser */
  70. private WebUser m_wu;
  71. /** Mode */
  72. private String m_mode;
  73. /**
  74. * WebLogin
  75. * @param t_request
  76. * @param t_response
  77. * @param t_ctx
  78. */
  79. public WebLogin (HttpServletRequest t_request, HttpServletResponse t_response, Ctx t_ctx)
  80. {
  81. m_request = t_request;
  82. m_response = t_response;
  83. m_ctx = t_ctx;
  84. // We will check the Request to see whether Parameters are overwritten
  85. if (m_request.getParameter ("P_ForwardTo")!=null)
  86. setP_ForwardTo (m_request.getParameter("P_ForwardTo"));
  87. if (m_request.getParameter ("SalesRep_ID")!=null)
  88. setP_SalesRep_ID (m_request.getParameter ("SalesRep_ID"));
  89. if (m_request.getParameter ("P_EMail")!=null)
  90. setP_EMail (m_request.getParameter ("P_EMail"));
  91. if (m_request.getParameter ("P_Password")!=null)
  92. setP_Password (m_request.getParameter ("P_Password"));
  93. if (m_request.getParameter ("P_Action")!=null)
  94. setP_Action (m_request.getParameter ("P_Action"));
  95. if (m_request.getParameter ("LOGIN_RelURL")!=null)
  96. setLogin_RelURL (m_request.getParameter ("LOGIN_RelURL"));
  97. if (m_request.getParameter ("update_page")!=null)
  98. setLogin_RelURL (m_request.getParameter ("update_page"));
  99. } // WebLogin
  100. /**
  101. * Init will initialize the WebLogin Object for further use
  102. * @return true if init was successfull
  103. */
  104. public boolean init()
  105. {
  106. m_session = m_request.getSession(true); // create new
  107. m_forward = WebUtil.getParameter (m_request, P_ForwardTo); // get forward from request
  108. if (m_forward != null)
  109. m_session.setAttribute(P_ForwardTo, m_forward);
  110. else
  111. m_forward = "";
  112. m_salesRep = WebUtil.getParameter (m_request, P_SalesRep_ID); // get SalesRep from request
  113. if (m_salesRep != null)
  114. m_session.setAttribute(P_SalesRep_ID, m_salesRep);
  115. // Get Base Info
  116. m_email = WebUtil.getParameter (m_request, P_EMail);
  117. if (m_email == null)
  118. m_email = "";
  119. m_email = m_email.trim();
  120. if (m_email != null)
  121. m_session.setAttribute (P_EMail, m_email);
  122. m_password = WebUtil.getParameter (m_request, P_Password);
  123. if (m_password == null)
  124. m_password = ""; // null loads w/o check
  125. m_password = m_password.trim();
  126. if (m_session.getAttribute (WebInfo.NAME)!=null)
  127. {
  128. WebInfo wi = (WebInfo)m_session.getAttribute(WebInfo.NAME);
  129. m_wu = wi.getWebUser ();
  130. }
  131. return true;
  132. } // init
  133. /**
  134. * Action run functions against the Login process.
  135. * @return true if successful
  136. * @throws IOException
  137. * @throws ServletException
  138. */
  139. public boolean action() throws IOException, ServletException
  140. {
  141. // Mode
  142. if (getMode() == null)
  143. {
  144. String mode = WebUtil.getParameter (m_request, P_Action);
  145. setMode(mode);
  146. if (mode == null || mode.equals("null"))
  147. return false;
  148. }
  149. boolean deleteCookie = "deleteCookie".equals(m_mode);
  150. if (deleteCookie)
  151. {
  152. log.fine("** deleteCookie");
  153. WebUtil.deleteCookieWebUser (m_request, m_response, COOKIE_NAME);
  154. }
  155. //
  156. boolean logout = "logout".equals(m_mode);
  157. if (logout || deleteCookie)
  158. {
  159. log.fine("** logout");
  160. if (m_session != null)
  161. {
  162. MSession cSession = MSession.get (m_ctx);
  163. if (cSession != null)
  164. cSession.logout();
  165. m_session.removeAttribute("AD_Session_ID");
  166. //
  167. m_wu = (WebUser)m_session.getAttribute(WebUser.NAME);
  168. if (m_wu != null)
  169. m_wu.logout();
  170. m_session.removeAttribute(WebUser.NAME);
  171. m_session.setMaxInactiveInterval(1);
  172. m_session.invalidate ();
  173. }
  174. // Forward to unsecure /
  175. WebUtil.createForwardPage(m_response, "Logout", "http://" + m_request.getServerName() + "/", 2);
  176. }
  177. // Send EMail *** Send Password EMail Request
  178. else if ("SendEMail".equals(m_mode))
  179. {
  180. log.info("** send mail");
  181. m_wu = WebUser.get (m_ctx, m_email); // find it
  182. if (!m_wu.isEMailValid())
  183. m_wu.setPasswordMessage("EMail not found in system");
  184. else
  185. {
  186. m_wu.setPassword(); // set password to current
  187. //
  188. String msg = WebUtil.sendEMail (m_request, m_wu,
  189. X_W_MailMsg.MAILMSGTYPE_UserPassword, new Object[]{
  190. m_request.getServerName(),
  191. m_wu.getName(),
  192. WebUtil.getFrom(m_request),
  193. m_wu.getPassword()});
  194. if (EMail.SENT_OK.equals(msg))
  195. m_wu.setPasswordMessage ("EMail sent");
  196. else
  197. m_wu.setPasswordMessage ("Problem sending EMail: " + msg);
  198. }
  199. m_forward = getLogin_RelURL ();
  200. } // SendEMail
  201. // Login
  202. else if ("Login".equals(m_mode))
  203. {
  204. log.info("** login " + m_email + "/" + m_password);
  205. // add Cookie
  206. WebUtil.addCookieWebUser(m_request, m_response, m_email, COOKIE_NAME);
  207. // Always re-query
  208. m_wu = WebUser.get (m_ctx, m_email, m_password, false);
  209. m_wu.login(m_password);
  210. // Password valid
  211. if (m_wu.isLoggedIn())
  212. {
  213. if (m_forward==null || m_forward.equals(getLogin_RelURL ()))
  214. m_forward = "/index.jsp";
  215. // Create Session with User ID
  216. MSession session = MSession.get (m_ctx, X_AD_Session.SESSIONTYPE_WebStore, true,
  217. m_request.getRemoteAddr(),
  218. m_request.getRemoteHost(), m_session.getId());
  219. if (session != null)
  220. m_session.setAttribute("AD_Session_ID", session.getAD_Session_ID());
  221. }
  222. else
  223. {
  224. m_forward = getLogin_RelURL ();
  225. log.fine("- PasswordMessage=" + m_wu.getPasswordMessage());
  226. }
  227. // If no session exists or is not loaded, load or create it
  228. if (m_session==null)
  229. m_session = m_request.getSession (true);
  230. m_session.setAttribute (WebInfo.NAME, new WebInfo (m_ctx, m_wu));
  231. } // Login
  232. // Login New
  233. else if ("LoginNew".equals(m_mode))
  234. {
  235. log.info("** loginNew");
  236. WebUtil.addCookieWebUser(m_request, m_response, "", COOKIE_NAME);
  237. m_wu = WebUser.get (m_ctx, "");
  238. m_forward = getLogin_RelURL ();
  239. }
  240. // Submit - update/new Contact
  241. else if ("Submit".equals(m_mode))
  242. {
  243. log.info("** submit " + m_email + "/" + m_password + " - AddrConf=" + m_addressConfirm);
  244. // we have a record for address update
  245. if (m_wu != null && m_wu.isLoggedIn() && m_addressConfirm) // address update
  246. ;
  247. else // Submit - always re-load user record
  248. m_wu = WebUser.get (m_ctx, m_email, null, false); // load w/o password check direct
  249. //
  250. if (m_wu.getAD_User_ID() != 0) // existing BPC
  251. {
  252. String passwordNew = WebUtil.getParameter (m_request, "PasswordNew");
  253. if (passwordNew == null)
  254. passwordNew = "";
  255. boolean passwordChange = passwordNew.length() > 0 && !passwordNew.equals(m_password);
  256. if (m_addressConfirm || m_wu.login (m_password))
  257. {
  258. // Create / set session
  259. if (m_wu.isLoggedIn())
  260. {
  261. MSession session = MSession.get (m_ctx, X_AD_Session.SESSIONTYPE_WebStore, true,
  262. m_request.getRemoteAddr(),
  263. m_request.getRemoteHost(), m_session.getId());
  264. if (session != null)
  265. m_session.setAttribute("AD_Session_ID", session.getAD_Session_ID());
  266. }
  267. //
  268. if (passwordChange)
  269. log.fine("- update Pwd " + m_email + ", Old=" + m_password + ", DB=" + m_wu.getPassword() + ", New=" + passwordNew);
  270. if (WebUtil.updateFields(m_request, m_wu, passwordChange))
  271. {
  272. if (passwordChange)
  273. m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Password changed");
  274. }
  275. else
  276. {
  277. m_forward = getLogin_RelURL ();
  278. log.warning(" - update not done");
  279. }
  280. }
  281. else
  282. {
  283. m_forward = getLogin_RelURL ();
  284. m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Email/Password not correct");
  285. log.warning(" - update not confirmed");
  286. }
  287. }
  288. else // new
  289. {
  290. log.fine("** new " + m_email + "/" + m_password);
  291. m_wu.setEmail (m_email);
  292. m_wu.setPassword (m_password);
  293. if (WebUtil.updateFields (m_request, m_wu, true))
  294. {
  295. if (m_wu.login(m_password))
  296. {
  297. m_session.setAttribute (WebInfo.NAME, new WebInfo (m_ctx, m_wu));
  298. // Create / set session
  299. MSession session = MSession.get (m_ctx, X_AD_Session.SESSIONTYPE_WebStore, true,
  300. m_request.getRemoteAddr(),
  301. m_request.getRemoteHost(), m_session.getId());
  302. if (session != null)
  303. m_session.setAttribute("AD_Session_ID", session.getAD_Session_ID());
  304. WebUtil.resendCode(m_request, m_wu);
  305. }
  306. else
  307. m_forward = getLogin_RelURL ();
  308. }
  309. else
  310. {
  311. log.fine("- failed - " + m_wu.getSaveErrorMessage() + " - " + m_wu.getPasswordMessage());
  312. m_forward = getLogin_RelURL ();
  313. }
  314. } // new
  315. if (m_wu!=null)
  316. m_session.setAttribute (WebInfo.NAME, new WebInfo (m_ctx, m_wu));
  317. } // Submit
  318. else if("email".equals(m_mode))
  319. {
  320. String email = WebUtil.getParameter (m_request, "EMail");
  321. if (email == null)
  322. email = "";
  323. email = email.trim();
  324. String emailNew = WebUtil.getParameter (m_request, "EMailNew");
  325. if (emailNew == null)
  326. emailNew = "";
  327. email = email.trim();
  328. if(emailNew.length() == 0||emailNew.equals(email))
  329. {
  330. setMessage("New EMail invalid.");
  331. return false;
  332. }
  333. if(!WebUtil.isEmailValid(emailNew))
  334. {
  335. setMessage("New EMail invalid.");
  336. return false;
  337. }
  338. m_wu.setEmail(emailNew);
  339. m_wu.save();
  340. m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "EMail Address Changed");
  341. m_session.setAttribute(WebInfo.NAME, new WebInfo(m_ctx, m_wu));
  342. }
  343. else if("password".equals(m_mode))
  344. {
  345. if (m_wu == null)
  346. {
  347. log.warning("No web user");
  348. return false;
  349. }
  350. String password = WebUtil.getParameter (m_request, "Password");
  351. if (password == null)
  352. password = ""; // null loads w/o check
  353. password = password.trim();
  354. if(!m_wu.login(password))
  355. {
  356. setMessage("Email/Password not correct");
  357. return false;
  358. }
  359. MSession session = MSession.get (m_ctx, X_AD_Session.SESSIONTYPE_WebStore, true,
  360. m_request.getRemoteAddr(), m_request.getRemoteHost(), m_session.getId());
  361. if (session != null)
  362. m_session.setAttribute("AD_Session_ID", session.getAD_Session_ID());
  363. String passwordNew = WebUtil.getParameter (m_request, "PasswordNew");
  364. if (passwordNew == null)
  365. passwordNew = "";
  366. password = password.trim();
  367. if( passwordNew.length() == 0 || passwordNew.equals(password))
  368. {
  369. setMessage("New Password invalid.");
  370. return false;
  371. }
  372. m_wu.setPasswordMessage(null);
  373. m_wu.setPassword(passwordNew);
  374. if(m_wu.getPasswordMessage() != null)
  375. {
  376. setMessage("New Password invalid.");
  377. return false;
  378. }
  379. m_wu.save();
  380. if (m_forward==null || m_forward.equals(getLogin_RelURL ()))
  381. m_forward = "/index.jsp";
  382. m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Password Changed");
  383. m_session.setAttribute(WebInfo.NAME, new WebInfo(m_ctx, m_wu));
  384. }
  385. else if("address".equals(m_mode))
  386. {
  387. m_wu.setC_Country_ID(WebUtil.getParamOrNull(m_request, "C_Country_ID"));
  388. m_wu.setC_Region_ID(WebUtil.getParamOrNull(m_request, "C_Region_ID"));
  389. m_wu.setRegionName(WebUtil.getParamOrNull(m_request, "RegionName"));
  390. m_wu.setName(WebUtil.getParamOrNull(m_request, "Name"));
  391. m_wu.setCompany(WebUtil.getParamOrNull(m_request, "Company"));
  392. m_wu.setTitle(WebUtil.getParamOrNull(m_request, "Title"));
  393. m_wu.setAddress(WebUtil.getParamOrNull(m_request, "Address"));
  394. m_wu.setAddress2(WebUtil.getParamOrNull(m_request, "Address2"));
  395. m_wu.setCity(WebUtil.getParamOrNull(m_request, "City"));
  396. m_wu.setPostal(WebUtil.getParamOrNull(m_request, "Postal"));
  397. m_wu.setPhone(WebUtil.getParamOrNull(m_request, "Phone"));
  398. m_wu.setFax(WebUtil.getParamOrNull(m_request, "Fax"));
  399. m_wu.save();
  400. m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "Contact Information Changed");
  401. m_session.setAttribute(WebInfo.NAME, new WebInfo(m_ctx, m_wu));
  402. }
  403. else if ("EMailVerify".equals(m_mode))
  404. {
  405. if (m_wu == null)
  406. {
  407. log.warning("No web user");
  408. return false;
  409. }
  410. log.info(m_forward + " - " + m_wu.toString());
  411. String cmd = WebUtil.getParameter(m_request, "ReSend");
  412. if (cmd != null && cmd.length() > 1)
  413. WebUtil.resendCode(m_request, m_wu);
  414. else
  415. {
  416. boolean success = m_wu.setEMailVerifyCode(
  417. WebUtil.getParameter(m_request, "VerifyCode"), m_request.getRemoteAddr());
  418. if (success)
  419. m_session.setAttribute(WebSessionCtx.HDR_MESSAGE, "EMail verified");
  420. }
  421. }
  422. else if ("bankaccountach".equals(m_mode))
  423. {
  424. if (m_wu == null)
  425. {
  426. log.warning("No web user");
  427. return false;
  428. }
  429. log.info(m_forward + " - " + m_wu.toString());
  430. MBPBankAccount thisBPBankAccount = m_wu.getBankAccount (true);
  431. // As this sets bankaccountach
  432. thisBPBankAccount.setIsACH (true);
  433. thisBPBankAccount.setA_City (WebUtil.getParamOrNull (m_request, "A_City"));
  434. thisBPBankAccount.setA_Name (WebUtil.getParamOrNull (m_request, "A_Name"));
  435. thisBPBankAccount.setAccountNo (WebUtil.getParamOrNull (m_request, "AccountNo"));
  436. if (WebUtil.getParamOrNull (m_request, "RoutingNo")!=null)
  437. {
  438. MBank[] thisBank = MBank.getByRoutingNo (m_ctx, WebUtil.getParamOrNull (m_request, "RoutingNo"));
  439. if (thisBank!=null && thisBank.length>0) {
  440. thisBPBankAccount.setC_Bank_ID (thisBank[0].get_ID ());
  441. } else {
  442. // Create Bank
  443. MBank newBank = new MBank(m_ctx, 0, null);
  444. newBank.setName (WebUtil.getParamOrNull (m_request, "A_City"));
  445. newBank.setRoutingNo (WebUtil.getParamOrNull (m_request, "RoutingNo"));
  446. newBank.save ();
  447. thisBPBankAccount.setC_Bank_ID (newBank.get_ID ());
  448. }
  449. thisBPBankAccount.setRoutingNo (WebUtil.getParamOrNull (m_request, "RoutingNo"));
  450. }
  451. thisBPBankAccount.save ();
  452. }
  453. else
  454. log.log(Level.WARNING, "Unknown request='" + m_mode + "'");
  455. return true;
  456. } // action
  457. /**
  458. * setMessage to set a Message
  459. * @param newVal
  460. */
  461. public void setMessage(String newVal)
  462. {
  463. if (newVal!=null)
  464. m_message = newVal;
  465. }
  466. /**
  467. * getMessage back
  468. * @return Message
  469. */
  470. public String getMessage()
  471. {
  472. return m_message;
  473. }
  474. /**
  475. * setP_ForwardTo to overwrite default "ForwardTo" Parameter
  476. * @param newVal new value to look for
  477. */
  478. public void setP_ForwardTo(String newVal)
  479. {
  480. if (newVal!=null)
  481. P_ForwardTo = newVal;
  482. }
  483. /**
  484. * getP_ForwardTo
  485. * @return ForwardTo request parameter
  486. */
  487. public String getP_ForwardTo()
  488. {
  489. return P_ForwardTo;
  490. }
  491. /**
  492. * setP_EMail to overwrite default "EMail" Parameter
  493. * @param newVal new value to look for
  494. */
  495. public void setP_EMail(String newVal)
  496. {
  497. if (newVal!=null)
  498. P_EMail = newVal;
  499. }
  500. /**
  501. * getP_EMail
  502. * @return EMail request parameter
  503. */
  504. public String getP_EMail()
  505. {
  506. return P_EMail;
  507. }
  508. /**
  509. * setP_Password to overwrite default "Password" Parameter
  510. * @param newVal new value to look for
  511. */
  512. public void setP_Password(String newVal)
  513. {
  514. if (newVal!=null)
  515. P_Password = newVal;
  516. }
  517. /**
  518. * getP_Password
  519. * @return Password request parameter
  520. */
  521. public String getP_Password()
  522. {
  523. return P_Password;
  524. }
  525. /**
  526. * setP_SalesRep_ID to overwrite default "SalesRep_ID" Parameter
  527. * @param newVal new value to look for
  528. */
  529. public void setP_SalesRep_ID(String newVal)
  530. {
  531. if (newVal!=null)
  532. P_SalesRep_ID = newVal;
  533. }
  534. /**
  535. * getP_SalesRep_ID
  536. * @return SalesRep_ID request parameter
  537. */
  538. public String getP_SalesRep_ID()
  539. {
  540. return P_SalesRep_ID;
  541. }
  542. /**
  543. * setP_Action to overwrite default "Action/Mode" Parameter
  544. * @param newVal new value to look for
  545. */
  546. public void setP_Action(String newVal)
  547. {
  548. if (newVal!=null)
  549. P_Action = newVal;
  550. }
  551. /**
  552. * getP_SalesRep_ID
  553. * @return SalesRep_ID request parameter
  554. */
  555. public String getP_Action()
  556. {
  557. return P_Action;
  558. }
  559. /**
  560. * setLogin_RelURL to overwrite default Login Relative URL
  561. * @param newVal new relative URL inside Domain to goto
  562. */
  563. public void setLogin_RelURL(String newVal)
  564. {
  565. if (newVal!=null)
  566. m_login_page = newVal;
  567. }
  568. /**
  569. * getLogin_RelURL
  570. * @return Login_RelURL request parameter
  571. */
  572. public String getLogin_RelURL()
  573. {
  574. return m_login_page;
  575. }
  576. /**
  577. * setLogin_RelURL to overwrite default Login Relative URL
  578. * @param newVal new relative URL inside Domain to goto
  579. */
  580. public void setUpdate_page(String newVal)
  581. {
  582. if (newVal!=null)
  583. m_update_page = newVal;
  584. }
  585. /**
  586. * getLogin_RelURL
  587. * @return Login_RelURL request parameter
  588. */
  589. public String getUpdate_page()
  590. {
  591. return m_update_page;
  592. }
  593. /**
  594. * setForward updates Forward URL
  595. * @param newVal
  596. */
  597. public void setForward(String newVal)
  598. {
  599. if (newVal!=null)
  600. m_forward = newVal;
  601. }
  602. /**
  603. * getForward
  604. * @return URL to forward request on to
  605. */
  606. public String getForward()
  607. {
  608. return m_forward;
  609. }
  610. /**
  611. * getSalesRep_ID
  612. * @return SalesRep_ID of the SalesRep_ID in the Request
  613. */
  614. public String getSalesRep_ID()
  615. {
  616. return m_salesRep;
  617. }
  618. /**
  619. * setAddressConfirm
  620. * @param newVal new addressConfirm
  621. */
  622. public void setAddressConfirm(boolean newVal)
  623. {
  624. m_addressConfirm = newVal;
  625. }
  626. /**
  627. * getAdressConfirm
  628. * @return boolean addressConfirm
  629. */
  630. public boolean getAddressConfirm()
  631. {
  632. return m_addressConfirm;
  633. }
  634. public WebUser getWebUser()
  635. {
  636. return m_wu;
  637. }
  638. /**
  639. * Set Mode
  640. * @param t_mode mode
  641. */
  642. public void setMode(String t_mode)
  643. {
  644. m_mode = t_mode;
  645. }
  646. public String getMode()
  647. {
  648. return m_mode;
  649. }
  650. } // WebLogin