@@ -212,23 +212,6 @@ protected static function normalize(StdClass &$data) {
212212 }
213213
214214 public function refresh () {
215- $ cache_key = "bnetdocs-userprofile- " . $ this ->user_id ;
216- $ cache_val = Common::$ cache ->get ($ cache_key );
217- if ($ cache_val !== false ) {
218- $ cache_val = unserialize ($ cache_val );
219- $ this ->biography = $ cache_val ->biography ;
220- $ this ->discord_username = $ cache_val ->discord_username ;
221- $ this ->facebook_username = $ cache_val ->facebook_username ;
222- $ this ->github_username = $ cache_val ->github_username ;
223- $ this ->instagram_username = $ cache_val ->instagram_username ;
224- $ this ->phone = $ cache_val ->phone ;
225- $ this ->reddit_username = $ cache_val ->reddit_username ;
226- $ this ->skype_username = $ cache_val ->skype_username ;
227- $ this ->steam_id = $ cache_val ->steam_id ;
228- $ this ->twitter_username = $ cache_val ->twitter_username ;
229- $ this ->website = $ cache_val ->website ;
230- return true ;
231- }
232215 if (!isset (Common::$ database )) {
233216 Common::$ database = DatabaseDriver::getDatabaseObject ();
234217 }
@@ -271,7 +254,6 @@ public function refresh() {
271254 $ this ->steam_id = $ row ->steam_id ;
272255 $ this ->twitter_username = $ row ->twitter_username ;
273256 $ this ->website = $ row ->website ;
274- Common::$ cache ->set ($ cache_key , serialize ($ row ), 300 );
275257 return true ;
276258 } catch (PDOException $ e ) {
277259 throw new QueryException ("Cannot refresh user profile " , $ e );
@@ -399,26 +381,6 @@ public function save() {
399381 }
400382
401383 $ stmt ->closeCursor ();
402-
403- $ object = new StdClass ();
404- $ object ->biography = $ this ->biography ;
405- $ object ->discord_username = $ this ->discord_username ;
406- $ object ->facebook_username = $ this ->facebook_username ;
407- $ object ->github_username = $ this ->github_username ;
408- $ object ->instagram_username = $ this ->instagram_username ;
409- $ object ->phone = $ this ->phone ;
410- $ object ->reddit_username = $ this ->reddit_username ;
411- $ object ->skype_username = $ this ->skype_username ;
412- $ object ->steam_id = $ this ->steam_id ;
413- $ object ->twitter_username = $ this ->twitter_username ;
414- $ object ->user_id = $ this ->user_id ;
415- $ object ->website = $ this ->website ;
416-
417- self ::normalize ($ object );
418-
419- $ cache_key = 'bnetdocs-userprofile- ' . $ this ->user_id ;
420- Common::$ cache ->set ($ cache_key , serialize ($ object ), 300 );
421-
422384 return true ;
423385 } catch (PDOException $ e ) {
424386 throw new QueryException ('Cannot save user profile ' , $ e );
0 commit comments