Revision 514
- Date:
- 2015/09/22 12:29:13
- Files:
Legend:
- Added
- Removed
- Modified
-
utf8/plugins/session/lib/session/AUTH/VKontakte.pm
221 221 } 222 222 if ( $state->{users}->use_credentials ) { 223 223 $user->create_credential( 224 name => $user_info->{last_name}.', '.$user_info->{first_name}, 224 225 vkontakte => $user_info->{uid}, 225 226 avatar => $user_info->{photo_big}, 226 227 ); … … 237 238 id => $user_info->{uid}, 238 239 name => $name, 239 240 nick => $user_info->{nickname} || $name, 240 login => 'vkontakte:'.$user_info->{uid}, 241 login => exists $local_session->{vk_email} ? $local_session->{vk_email} : 'vkontakte:'.$user_info->{uid}, 241 242 status => 1, 242 243 type => 0, 243 244 auth_by => 'vkontakte', … … 246 247 if ( $user_info->{photo} ) { 247 248 $data{avatar} = $user_info->{photo}; 248 249 } 249 if ( $user_info->{email} ) { 250 $data{email} = $user_info->{email}; 251 } 252 250 $local_session->set( %data ); 253 251 } 254 252 return $local_session;