change userid

This commit is contained in:
Mohamed Nouffer
2023-07-26 16:53:34 +05:30
parent c63add9e12
commit 0df97ff9bc

View File

@ -108,6 +108,7 @@ const TheContent = () => {
function get_token_from_storage_or_cookie() { function get_token_from_storage_or_cookie() {
//return true; //return true;
user_id = null;
const cookies = new Cookies(); const cookies = new Cookies();
const shib = cookies.get('_shibsession_64656661756c7468747470733a2f2f66627373736f2e74732e62697a736964652e62697a2f73686962626f6c657468') const shib = cookies.get('_shibsession_64656661756c7468747470733a2f2f66627373736f2e74732e62697a736964652e62697a2f73686962626f6c657468')
if (shib !== undefined) { if (shib !== undefined) {
@ -117,7 +118,8 @@ const TheContent = () => {
fetchUser().then(() => { fetchUser().then(() => {
if(UserId === ''){ if(UserId === ''){
let id = Math.floor(100000 + Math.random() * 900000) let id = Math.floor(100000 + Math.random() * 900000)
setUserId(id); user_id = id;
//setUserId(id);
} }
const _firstname = UserData.firstname; const _firstname = UserData.firstname;
const _lastname = UserData.lastname; const _lastname = UserData.lastname;
@ -145,6 +147,7 @@ const TheContent = () => {
return true; return true;
}); });
} }
setUserId(user_id);
}); });
} else { } else {
return null; return null;