Commit e87b9d0aa0742a11bd4825dc88c35f4bd7962853
1 parent
e4285623
Delete commented-out _fieldValues, and move _aFieldToSelect and _table
to the top as per others. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4188 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
23 additions
and
42 deletions
lib/users/User.inc
| ... | ... | @@ -56,6 +56,29 @@ class User extends KTEntity { |
| 56 | 56 | /** authentication details so that the source knows who this user is */ |
| 57 | 57 | var $sAuthenticationDetails = null; |
| 58 | 58 | |
| 59 | + var $_aFieldToSelect = array( | |
| 60 | + 'iId' => 'id', | |
| 61 | + 'sUserName' => 'username', | |
| 62 | + 'sName' => 'name', | |
| 63 | + 'sPassword' => 'password', | |
| 64 | + 'iQuotaMax' => 'quota_max', | |
| 65 | + 'iQuotaCurrent' => 'quota_current', | |
| 66 | + 'sEmail' => 'email', | |
| 67 | + 'sMobile' => 'mobile', | |
| 68 | + 'bEmailNotification' => 'email_notification', | |
| 69 | + 'bSmsNotification' => 'sms_notification', | |
| 70 | + 'sLdapDn' => 'ldap_dn', | |
| 71 | + 'iMaxSessions' => 'max_sessions', | |
| 72 | + 'iLanguageID' => 'language_id', | |
| 73 | + 'iAuthenticationSourceId' => 'authentication_source_id', | |
| 74 | + 'sAuthenticationDetails' => 'authentication_details', | |
| 75 | + ); | |
| 76 | + | |
| 77 | + function _table() { | |
| 78 | + global $default; | |
| 79 | + return $default->users_table; | |
| 80 | + } | |
| 81 | + | |
| 59 | 82 | function User($sNewUserName = null, $sNewName = null, $sNewPassword = null, $iNewQuotaMax = null, $sNewEmail= null, $sNewMobile= null, $bNewEmailNotification= null, $bNewSmsNotification= null, $sNewLdapDn= null, $iNewMaxSessions= null, $iNewLanguageID= null) { |
| 60 | 83 | //object not created in database yet |
| 61 | 84 | $this->iId = -1; |
| ... | ... | @@ -133,48 +156,6 @@ class User extends KTEntity { |
| 133 | 156 | function getAuthenticationDetails() { return $this->sAuthenticationDetails; } |
| 134 | 157 | function setAuthenticationDetails($sNewValue) { $this->sAuthenticationDetails = $sNewValue; } |
| 135 | 158 | |
| 136 | - /* | |
| 137 | - function _fieldValues() { | |
| 138 | - return array( | |
| 139 | - 'username' => $this->sUserName, | |
| 140 | - 'name' => $this->sName, | |
| 141 | - 'password' => md5($this->sPassword), | |
| 142 | - 'quota_max' => $this->iQuotaMax, | |
| 143 | - 'quota_current' => 0, | |
| 144 | - 'email' => $this->sEmail, | |
| 145 | - 'mobile' => $this->sMobile, | |
| 146 | - 'email_notification' => KTUtil::anyToBool($this->bEmailNotification), | |
| 147 | - 'sms_notification' => KTUtil::anyToBool($this->bSmsNotification), | |
| 148 | - 'ldap_dn' => $this->sLdapDn, | |
| 149 | - 'max_sessions' => $this->iMaxSessions, | |
| 150 | - 'language_id' => $this->iLanguageID, | |
| 151 | - ); | |
| 152 | - } | |
| 153 | - */ | |
| 154 | - | |
| 155 | - var $_aFieldToSelect = array( | |
| 156 | - 'iId' => 'id', | |
| 157 | - 'sUserName' => 'username', | |
| 158 | - 'sName' => 'name', | |
| 159 | - 'sPassword' => 'password', | |
| 160 | - 'iQuotaMax' => 'quota_max', | |
| 161 | - 'iQuotaCurrent' => 'quota_current', | |
| 162 | - 'sEmail' => 'email', | |
| 163 | - 'sMobile' => 'mobile', | |
| 164 | - 'bEmailNotification' => 'email_notification', | |
| 165 | - 'bSmsNotification' => 'sms_notification', | |
| 166 | - 'sLdapDn' => 'ldap_dn', | |
| 167 | - 'iMaxSessions' => 'max_sessions', | |
| 168 | - 'iLanguageID' => 'language_id', | |
| 169 | - 'iAuthenticationSourceId' => 'authentication_source_id', | |
| 170 | - 'sAuthenticationDetails' => 'authentication_details', | |
| 171 | - ); | |
| 172 | - | |
| 173 | - function _table() { | |
| 174 | - global $default; | |
| 175 | - return $default->users_table; | |
| 176 | - } | |
| 177 | - | |
| 178 | 159 | /** |
| 179 | 160 | * Delete the current object from the database |
| 180 | 161 | * | ... | ... |