You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If null, it is not. Otherwise, the returned element will be <a>. Get the href attribute and parse the query parameter pct_id=<other_id>. The complete URL looks like this: https://sigarra.up.pt/feup/pt/vld_entidades_geral.entidade_pagina?pct_id=<other_id>
Getting the real user-id
For whatever reason, the ID used in the logged in user does not match the actual user identifier. It will be necessary to make a GET request for that hyperlink. The response is actually a redirect, notice the <meta http-equiv="Refresh">:
Motivation
No, I don't want to email myself 😄
Testing if a user is logged in?
If null, it is not. Otherwise, the returned element will be
<a>
. Get thehref
attribute and parse the query parameterpct_id=<other_id>
. The complete URL looks like this:https://sigarra.up.pt/feup/pt/vld_entidades_geral.entidade_pagina?pct_id=<other_id>
Getting the real user-id
For whatever reason, the ID used in the logged in user does not match the actual user identifier. It will be necessary to make a GET request for that hyperlink. The response is actually a redirect, notice the
<meta http-equiv="Refresh">
:For students:
For staff:
Given the response, perhaps use the
DOMParser
and then make a query selector for<a>
and parse the href.Caching
It will be helpful to store a mapping of
other_id
toid
to prevent requests on every new page load.The text was updated successfully, but these errors were encountered: