Changeset 28668 for extensions
- Timestamp:
- Jun 10, 2014, 1:40:40 PM (10 years ago)
- Location:
- extensions/oAuth
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/include/public_events.inc.php
r26626 r28668 149 149 } 150 150 151 if ( pwg_login(false, $_POST['username'], $_POST['password'], false) ) 152 { 151 $user_id = get_userid($_POST['username']); 152 153 if ($user_id === false) 154 { 155 $page['errors'][] = l10n('Invalid username or email'); 156 } 157 else if ($user_id == $conf['webmaster_id']) 158 { 159 $page['errors'][] = l10n('For security reason, the main webmaster account can\'t be merged with a remote account, but you can use another webmaster account.'); 160 } 161 else if (pwg_login(false, $_POST['username'], $_POST['password'], false)) 162 { 163 // update oauth field 164 single_update( 165 USER_INFOS_TABLE, 166 array('oauth_id', $oauth_id), 167 array('user_id', $user['id']) 168 ); 169 153 170 pwg_unset_session_var('oauth_new_user'); 154 155 // update oauth field156 $query = '157 UPDATE ' . USER_INFOS_TABLE . '158 SET oauth_id = "' . $oauth_id . '"159 WHERE user_id = ' . $user['id'] . '160 ;';161 pwg_query($query);162 171 163 172 redirect('profile.php'); … … 168 177 } 169 178 } 179 180 // overwrite fields with remote datas 181 if ($provider == 'Persona') 182 { 183 $_POST['login'] = ''; 184 $_POST['mail_address'] = $user_identifier; 185 } 170 186 else 171 187 { 172 // overwrite fields with remote datas 173 if ($provider == 'Persona') 174 { 175 $_POST['login'] = ''; 176 $_POST['mail_address'] = $user_identifier; 177 } 178 else 179 { 180 $_POST['login'] = $remote_user->displayName; 181 $_POST['mail_address'] = $remote_user->email; 182 } 188 $_POST['login'] = $remote_user->displayName; 189 $_POST['mail_address'] = $remote_user->email; 183 190 } 184 191 -
extensions/oAuth/language/en_UK/plugin.lang.php
r26626 r28668 30 30 $lang['Associate with an existing account'] = 'Associate with an existing account'; 31 31 $lang['Allow users to merge existing account with new <i>Social Connect</i> identity'] = 'Allow users to merge existing account with new <i>Social Connect</i> identity'; 32 $lang['For security reason, the main webmaster account can\'t be merged with a remote account, but you can use another webmaster account.'] = 'For security reason, the main webmaster account can\'t be merged with a remote account, but you can use another webmaster account.'; 32 33 33 34 ?> -
extensions/oAuth/language/fr_FR/plugin.lang.php
r26626 r28668 30 30 $lang['Cancel'] = 'Annuler'; 31 31 $lang['Please enter your user ID'] = 'Veuillez entrer votre ID d\'utilisateur'; 32 $lang['For security reason, the main webmaster account can\'t be merged with a remote account, but you can use another webmaster account.'] = 'Pour des raisons de sécurité, le compte webmaster principal ne peut être associé avec un compte distant, mais vous pouvez utiliser un autre compte webmaster.'; 33 32 34 ?> -
extensions/oAuth/main.inc.php
r26667 r28668 1 1 <?php 2 2 /* 3 Plugin Name: Social Connect (OAuth)3 Plugin Name: Social Connect 4 4 Version: auto 5 5 Description: Provides various ways to sign in your gallery (Twitter, Facebook, Google, etc.)
Note: See TracChangeset
for help on using the changeset viewer.