def lastfm_unreg(uid): if uid == 'me': lfm = LastFm(UserManager.get(store, session.get('userid'))[1], app.logger) else: if not UserManager.get(store, session.get('userid'))[1].admin or not UserManager.get(store, uid)[0] is UserManager.SUCCESS: return redirect(url_for('index')) lfm = LastFm(UserManager.get(store, uid)[1], app.logger) lfm.unlink_account() store.commit() flash('Unliked LastFM account') return redirect(url_for('user_profile', uid = uid))
def lastfm_unreg(): lfm = LastFm(UserManager.get(store, session.get('userid'))[1], app.logger) lfm.unlink_account() store.commit() flash('Unliked LastFM account') return redirect(url_for('user_profile'))
def lastfm_unreg(uid, user): lfm = LastFm(app.config['LASTFM'], user, app.logger) lfm.unlink_account() store.commit() flash('Unlinked LastFM account') return redirect(url_for('user_profile', uid = uid))
def lastfm_unreg(uid, user): lfm = LastFm(user, app.logger) lfm.unlink_account() store.commit() flash('Unlinked LastFM account') return redirect(url_for('user_profile', uid = uid))