[CDB] Linked Accounts

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2][RC] Linked Accounts

Post by </Solidjeuh> »

When switching to my Testaccount I get this error message:

Code: Select all

A general error has occurred: 200: Unknown server error
» /switchaccount/2
But the switch worked ..
When I try to switch back to my admin account, I'm logged out ..

No other error messages in server logs. Just the one above in acp

phpBB 3.2.2
PHP 7.0.22
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2][BETA] Linked Accounts

Post by </Solidjeuh> »

HiFiKabin wrote: Tue Mar 13, 2018 11:50 am
Flerex wrote: Mon Mar 12, 2018 8:40 pm
HiFiKabin wrote: Mon Mar 12, 2018 4:14 pm phpBB 3.2.2

php 7.0.25
I'm still not able to replicate the problem. Is it a fresh phpBB installation? Do you have any other extensions installed?

I don't know what may be happening.
:oops: my error not yours. Working perfectly.
What was the problem? I have the same ...
Only that I also get logged out when I switch back to my admin account
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6673
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James
Contact:

Re: [3.2][BETA] Linked Accounts

Post by HiFiKabin »

Froddelaar wrote: Sun Mar 25, 2018 7:42 pm
What was the problem? I have the same ...
Only that I also get logged out when I switch back to my admin account
Erm, can't remember now. :oops: Corrupt file probably :?:
User avatar
</Solidjeuh>
Registered User
Posts: 1788
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2][RC] Linked Accounts

Post by </Solidjeuh> »

Strange, logout problem seems to be gone.
But the "Unknown server error" keeps when switch account on some random pages made with the "Pages extension"
https://www.phpbb.com/customise/db/extension/pages/
zorni
Registered User
Posts: 119
Joined: Mon Mar 23, 2009 10:29 pm
Contact:

Re: [3.2][RC] Linked Accounts

Post by zorni »

Doesn't work for me, if the selected auth method is oauth. If I switch to DB everything is fine.
User avatar
Flerex
Registered User
Posts: 134
Joined: Sun Oct 14, 2012 8:35 pm
Location: Galicia, Spain
Name: Flerex
Contact:

Re: [3.2][RC] Linked Accounts

Post by Flerex »

Froddelaar wrote: Mon Mar 26, 2018 12:18 pm Strange, logout problem seems to be gone.
But the "Unknown server error" keeps when switch account on some random pages made with the "Pages extension"
https://www.phpbb.com/customise/db/extension/pages/
I installed the extension, created a custom page with it and switched accounts from within that page without any kind of problem. I am not able to replicate this problem.
zorni wrote: Thu Mar 29, 2018 7:38 am Doesn't work for me, if the selected auth method is oauth. If I switch to DB everything is fine.
To be honest I didn't take into account all other auth methods available in phpBB, mostly because I'm not very sure about how they work and how phpBB handles them. If anyone with more expertise on the matter would be so kind to help I would appreciate it.
User avatar
alex75
Registered User
Posts: 509
Joined: Sun Jun 10, 2012 9:09 am
Location: Italy
Name: Alessandro
Contact:

Re: [3.2][RC] Linked Accounts

Post by alex75 »

great idea. good job.
I would call it account switcher ;)
would it be possible to choose the groups to enable this extension?
Many forums prohibit multi accounts.
However, this extension would be useful for the admin groups.
User avatar
Flerex
Registered User
Posts: 134
Joined: Sun Oct 14, 2012 8:35 pm
Location: Galicia, Spain
Name: Flerex
Contact:

Re: [3.2][RC] Linked Accounts

Post by Flerex »

alex75 wrote: Sun Apr 08, 2018 11:11 am great idea. good job.
I would call it account switcher ;)
would it be possible to choose the groups to enable this extension?
Many forums prohibit multi accounts.
However, this extension would be useful for the admin groups.
That feature is already supported by the extension. You can change the permissions of both the ability to switch account and to access the ACP management module.
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [3.2][BETA] Linked Accounts

Post by Sniper_E »

Flerex wrote: Mon Mar 12, 2018 9:17 pm
nou nou wrote: Mon Mar 12, 2018 8:49 pm
fagbutlil wrote: Mon Mar 12, 2018 7:18 pm I use the account switcher by dmzx that works great.
Apart from that the UCP tab for Linked Account shows even when you don't have the permission to use the extension.

Keeping an eye on this one to see if it has the same problem.
I can confirm that doesn't happen with Linked Accounts.
I can not confirm that. Let me give you details of my tests and efforts to resolve this. But very nice ext.

-- In the ucp page.
I can login with my test account, which has no permissions to use linked accounts, and I still see the Linked Accounts tab in the ucp.
I can go in that tab and setup a linked account, and on submit I get a white page.

-- On the index page.
The links under my username on index the linked accounts show up fine.
When I unlink all accounts then nothing shows there. That is fine, working perfect.

-- Adding a link.
On a new install there is not a link to the tab for this ext.
I was trying to add a link to your ucp tab on index under username and it shows up for everyone just like the ucp tab does.

-- Adding a switch for IF
I have also been trying to setup a switch to where that tab will not show with no luck.
The {% if switchable_account %} shows accounts if you have any linked. But I see no {% if use_linked_accounts %} to use.

I created this link and tried to hide it if a user has no permission.

Code: Select all

{% if switchable_account %}
{% INCLUDECSS '@flerex_linkedaccounts/linkedaccounts.css' %}
<li id="linked_accounts" class="bg1">
	<ul>
		{% for account in switchable_account %}
		<li><a href="{{ account.SWITCH_LINK }}">
			{% if account.AVATAR %}
				{{ account.AVATAR }}
			{% else %}
				<img src="{T_THEME_PATH}/images/no_avatar.gif" class="avatar" alt="">
			{% endif %}
			{{ account.NAME }}
		</a></li>
		{% endfor %}
	</ul>
</li>
{% elseif U_USE_LINKED_ACCOUNT %}
<li class="bg1">
	<a href="{{ U_PROFILE }}?i=-flerex-linkedaccounts-ucp-main_module&mode=link">
		<i class="icon fa-user-secret fa-fw" aria-hidden="true"></i><span>{{ lang('LINKING_ACCOUNT') }}</span></a>
</li>
{% endif %}
And in the main_listener I added this:

Code: Select all

			$this->template->assign_block_vars('switchable_account', array(
				'U_USE_LINKED_ACCOUNT' => $this->auth->acl_get('u_link_accounts') ? true : false,
But with no luck. Is there a way to hide the ucp tab and any link to the linked accounts tab if you have no permission?
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
nou nou
Registered User
Posts: 505
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][RC] Linked Accounts

Post by nou nou »

That's odd.

Keep in mind that this extension enables the functionality for all registered users by default?
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [3.2][RC] Linked Accounts

Post by Sniper_E »

Then what good is permissions if it's set yes to all registered users.

Maybe there is an if statement that we can use in this but with everyone having permission, well.
That defeats the purpose of having permissions.

But as a registered user I can not create a linked account. So I don't need to see the tab. That's just a tease. :lol:
I'll test it changing the migration to admins only and see if I can find a switch to hide the ucp tab.
Last edited by Sniper_E on Mon Apr 16, 2018 9:51 pm, edited 1 time in total.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
nou nou
Registered User
Posts: 505
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][RC] Linked Accounts

Post by nou nou »

Well, no, you just have to set the permission to 'no' after installing the extension.
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [3.2][RC] Linked Accounts

Post by Sniper_E »

I don't think so. I just tried that and no go. I'll play with it some more and see if there is a way.

I don't think you understand the problem here.
{% if switchable_account %} shows the linked accounts I have setup.
If I unlink my accounts then nothing shows.
I'm adding a link to the ucp tab {% if not switchable_account %}
And the ucp tabs should not show if you have no permission.
My new link should not show if you have no permission either.

How do you hide the ucp tabs if you have no permission to use it?

EDIT: The ucp tab is hidden if you have no permission. But that is not the issue I'm dealing with.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
User avatar
nou nou
Registered User
Posts: 505
Joined: Sat Oct 29, 2016 8:08 pm

Re: [3.2][RC] Linked Accounts

Post by nou nou »

But that's what I am not seeing - if I set users to not have permission to use Linked Accounts, nothing shows in the UCP.

In contrast with dmzx's extension where I have fruitlessly pulled my hair out trying to disable those tabs...
User avatar
Sniper_E
Registered User
Posts: 1136
Joined: Wed May 09, 2007 12:18 am
Location: Shreveport, Louisiana
Name: Ed Humphrey
Contact:

Re: [3.2][RC] Linked Accounts

Post by Sniper_E »

That is correct. If the user has no permission I see the ucp tab is gone. That is working fine.

If a user has permission the ucp tab shows and they can create a linked account.
1) If you have a linked account the users you linked to will show under your user's dropdown.
2) If you unlink all of your accounts then nothing shows in that dropdown.

We can agree on that. All of that is working fine. No problems.

So if you have permission and you have no linked accounts setup you see nothing under the dropdown.
That would be the same case when you first installed this extension.

But if I have no links setup and I do have permission then I would like to put a link to the ucp tab in that place.
The same as if I wanted to just put a link in the navbar but it will not show if you have no permission.

Am I explaining this right?
There is no if statement I can use (if you have permission) and (if not switchable_account) to show or hide a link.
Image . -.. / .... ..- -- .--. .... .-. . -.--
No is NEVER an Option and NEVER is the only Option when it comes to Giving Up!

:!: Sniper_E Styles | phpbbmodders :!:
Locked

Return to “Extensions in Development”