Commit 59ba0c0080816198069c327401cb0f25e7281bce

Authored by nbm
1 parent 59b2dd03

Remove the old-style userCreateFromArray and the explicit constructor

with parameters.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4242 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 2 additions and 33 deletions
lib/users/User.inc
... ... @@ -77,28 +77,13 @@ class User extends KTEntity {
77 77 'sAuthenticationDetails' => 'authentication_details',
78 78 );
79 79  
  80 + var $_bUsePearError = true;
  81 +
80 82 function _table() {
81 83 global $default;
82 84 return $default->users_table;
83 85 }
84 86  
85   - function User($sNewUserName = null, $sNewName = null, $sNewPassword = null, $iNewQuotaMax = null, $sNewEmail= null, $sNewMobile= null, $bNewEmailNotification= null, $bNewSmsNotification= null, $sNewLdapDn= null, $iNewMaxSessions= null, $iNewLanguageID= null) {
86   - //object not created in database yet
87   - $this->iId = -1;
88   - $this->sUserName = $sNewUserName;
89   - $this->sName = $sNewName;
90   - $this->sPassword = $sNewPassword;
91   - $this->iQuotaMax = $iNewQuotaMax;
92   - $this->sEmail = $sNewEmail;
93   - $this->sMobile = $sNewMobile;
94   - $this->bEmailNotification = $bNewEmailNotification;
95   - $this->bSmsNotification = $bNewSmsNotification;
96   - $this->sLdapDn = $sNewLdapDn;
97   - $this->iMaxSessions = $iNewMaxSessions;
98   - $this->iLanguageID = $iNewLanguageID;
99   - $this->bPasswordChanged = false;
100   - }
101   -
102 87 /** Get the user's login name */
103 88 function getUserName() { return $this->sUserName; }
104 89 /** Set the user's login name */
... ... @@ -365,19 +350,3 @@ class User extends KTEntity {
365 350 return KTEntityUtil::getBy('User', 'username', $sUserName, $aOptions);
366 351 }
367 352 }
368   -
369   -/**
370   -* Static function
371   -*
372   -* Creates a User object from an array
373   -*
374   -* @param Array Array of parameters. Must match order of parameters in constructor
375   -*
376   -* @return User user object
377   -*/
378   -function & userCreateFromArray($aParameters) {
379   - $oUser = & new User($aParameters[0], $aParameters[1], $aParameters[2], $aParameters[3], $aParameters[4], $aParameters[5], $aParameters[6], $aParameters[7], $aParameters[8], $aParameters[9], $aParameters[10]);
380   - return $oUser;
381   -}
382   -
383   -?>
... ...