dojo.require('fieldmapper.Fieldmapper');
dojo.require('fieldmapper.OrgUtils');
dojo.require('openils.Util');
+ dojo.require('dojo.cookie');
dojo.requireLocalization("openils.User", "User");
dojo.declare('openils.User', null, {
this.authcookie = kwargs.authcookie || openils.User.authcookie;
this.permOrgStoreCache = {}; /* permName => permOrgUnitStore map */
+ if (this.authcookie) this.authtoken = dojo.cookie(this.authcookie);
if (this.id && this.authtoken) this.user = this.getById( this.id );
else if (this.authtoken) this.getBySession();
else if (kwargs.login) this.login();
if (!openils.User.authtime) openils.User.authtime = _u.authtime;
_u.getBySession(onComplete);
if(_u.authcookie) {
- dojo.require('dojo.cookie');
dojo.cookie(_u.authcookie, _u.authtoken, {path:'/'});
}
}
if (!openils.User.authtime) openils.User.authtime = _u.authtime;
if(_u.authcookie) {
- dojo.require('dojo.cookie');
dojo.cookie(_u.authcookie, _u.authtoken, {path:'/'});
}