Changeset 9435
- Timestamp:
- 04/22/08 22:03:48 (3 weeks ago)
- Files:
-
- 1 modified
-
trunk/Open-ILS/web/js/dojo/openils/User.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Open-ILS/web/js/dojo/openils/User.js
r9433 r9435 36 36 this.id = kwargs.id; 37 37 this.user = kwargs.user; 38 this.authtoken = kwargs.authtoken; 39 this.authtime = kwargs.authtime; 38 this.passwd = kwargs.passwd; 39 this.authtoken = kwargs.authtoken || openils.User.authtoken; 40 this.authtime = kwargs.authtime || openils.User.authtime; 40 41 this.login_type = kwargs.login_type; 41 42 this.location = kwargs.location; 42 43 43 if (this. id && this.authtoken) this.getById();44 else if (this. authtoken) this.getBySession();44 if (this.authtoken) this.getBySession(); 45 else if (this.id && this.authtoken) this.user = this.getById( this.id ); 45 46 else if (kwargs.login) this.login(); 46 47 … … 54 55 var user = r.recv().content(); 55 56 _u.user = user; 57 if (!openils.User.user) !openils.User.user = _u.user; 56 58 if(onComplete) 57 59 onComplete(user); … … 108 110 var data = rr.recv().content(); 109 111 _u.authtoken = data.payload.authtoken; 112 if (!openils.User.authtoken) !openils.User.authtoken = _u.authtoken; 110 113 _u.authtime = data.payload.authtime; 114 if (!openils.User.authtime) !openils.User.authtime = _u.authtime; 111 115 _u.getBySession(onComplete); 112 116 } … … 200 204 201 205 }); 206 207 openils.User.user = null; 208 openils.User.authtoken = null; 209 openils.User.authtime = null; 210 202 211 } 203 212
