mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-06 01:56:50 +02:00
* Mail/OAuth: fix mail account creation failed for regular EGroupware users / non-admins
This commit is contained in:
parent
188334d647
commit
178047d8d6
@ -1570,9 +1570,16 @@ class admin_mail
|
|||||||
}
|
}
|
||||||
$content['acc_oauth_access_token'] = $oidc->getAccessToken();
|
$content['acc_oauth_access_token'] = $oidc->getAccessToken();
|
||||||
|
|
||||||
$GLOBALS['egw_info']['flags']['currentapp'] = 'admin';
|
if (empty($GLOBALS['egw_info']['user']['apps']['admin']))
|
||||||
|
{
|
||||||
$obj = new self;
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'mail';
|
||||||
|
$obj = new mail_wizard();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'admin';
|
||||||
|
$obj = new self;
|
||||||
|
}
|
||||||
unset($content['oauth_failure']);
|
unset($content['oauth_failure']);
|
||||||
if (!empty($content['acc_id']))
|
if (!empty($content['acc_id']))
|
||||||
{
|
{
|
||||||
@ -1593,9 +1600,16 @@ class admin_mail
|
|||||||
*/
|
*/
|
||||||
public static function oauthFailure(Throwable $exception=null, array $content)
|
public static function oauthFailure(Throwable $exception=null, array $content)
|
||||||
{
|
{
|
||||||
$GLOBALS['egw_info']['flags']['currentapp'] = 'admin';
|
if (empty($GLOBALS['egw_info']['user']['apps']['admin']))
|
||||||
|
{
|
||||||
$obj = new self;
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'mail';
|
||||||
|
$obj = new mail_wizard();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'admin';
|
||||||
|
$obj = new self;
|
||||||
|
}
|
||||||
$content['oauth_failure'] = $exception ?: true;
|
$content['oauth_failure'] = $exception ?: true;
|
||||||
if (!empty($content['acc_id']))
|
if (!empty($content['acc_id']))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user