File tree Expand file tree Collapse file tree
plugins/bcc-login/includes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ class BCC_Login_Client {
88 function __construct ( BCC_Login_Settings $ settings ) {
99 $ this ->_settings = $ settings ;
1010 add_action ( 'parse_request ' , array ( $ this , 'on_parse_request ' ) );
11+ add_shortcode ( 'bcc_person_uid ' , array ( $ this , 'get_current_user_person_uid ' ) );
1112 }
1213
1314 function start_login ($ reauth = false ) {
@@ -376,7 +377,6 @@ private function request_tokens( $code ) {
376377 }
377378
378379 public function get_current_user_person_uid () {
379-
380380 $ token = '' ;
381381 if (isset ($ _COOKIE ['oidc_token_id ' ])) {
382382 $ token_id = $ _COOKIE ['oidc_token_id ' ];
@@ -393,6 +393,7 @@ public function get_current_user_person_uid() {
393393
394394 return $ claims ['https://login.bcc.no/claims/personUid ' ];
395395 }
396+
396397 return false ;
397398 }
398399
You can’t perform that action at this time.
0 commit comments