added user csv data
This commit is contained in:
@ -29,6 +29,7 @@ const TheContent = () => {
|
||||
|
||||
const [SsoSession, setSsoSession] = useState('');
|
||||
const [UserData, setUserData] = useState('');
|
||||
const [UserId, setUserId] = useState('');
|
||||
|
||||
async function fetchSession() {
|
||||
|
||||
@ -90,7 +91,6 @@ const TheContent = () => {
|
||||
}
|
||||
|
||||
function get_token_from_storage_or_cookie() {
|
||||
|
||||
const cookies = new Cookies();
|
||||
const shib = cookies.get('_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468')
|
||||
if (shib !== undefined) {
|
||||
@ -98,6 +98,7 @@ const TheContent = () => {
|
||||
if (SsoSession !== null) {
|
||||
fetchUser().then(() => {
|
||||
let id = Math.floor(100000 + Math.random() * 900000)
|
||||
setUserId(id);
|
||||
const _firstname = UserData.firstname;
|
||||
const _lastname = UserData.lastname;
|
||||
const _email = UserData.email;
|
||||
@ -132,7 +133,7 @@ const TheContent = () => {
|
||||
render = {
|
||||
props =>
|
||||
get_token_from_storage_or_cookie() !== null ?
|
||||
( <route.component {...props }/>
|
||||
( <route.component {...props} userid={UserId}/>
|
||||
) : ( <Redirect to = {
|
||||
{ pathname: "/sso" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user