Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] [12857] Fixed invalid user logged in #100

Merged
merged 1 commit into from
May 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion OpenStack Summit/CoreSummit/Login.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public extension Store {

case let .Value(member):

self.session.name = member.name
self.session.member = member.identifier

completion(nil)
Expand Down
20 changes: 0 additions & 20 deletions OpenStack Summit/CoreSummit/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
/// Provides the storage for session values
public protocol SessionStorage {

/// The name of the authenticated user.
var name: String? { get set }

/// The authenticated member.
var member: Identifier? { get set }

Expand All @@ -24,7 +21,6 @@ public extension SessionStorage {
/// Resets the session storage.
mutating func clear() {

self.name = nil
self.member = nil
}
}
Expand Down Expand Up @@ -55,21 +51,6 @@ public final class UserDefaultsSessionStorage: SessionStorage {
}
}

public var name: String? {

get { return userDefaults.stringForKey(Key.name.rawValue) }

set {

guard let stringValue = newValue
else { userDefaults.removeObjectForKey(Key.name.rawValue); return }

userDefaults.setObject(stringValue as NSString, forKey: Key.name.rawValue)

userDefaults.synchronize()
}
}

public var hadPasscode: Bool {

get { return userDefaults.boolForKey(Key.hadPasscode.rawValue) }
Expand All @@ -80,7 +61,6 @@ public final class UserDefaultsSessionStorage: SessionStorage {
private enum Key: String {

case member = "CoreSummit.UserDefaultsSessionStorage.Key.Member"
case name = "CoreSummit.UserDefaultsSessionStorage.Key.Name"
case hadPasscode = "CoreSummit.UserDefaultsSessionStorage.Key.HadPasscode"
}
}
5 changes: 0 additions & 5 deletions OpenStack Summit/OpenStack Summit/MenuViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,6 @@ final class MenuViewController: UIViewController, UITextFieldDelegate, ActivityV
pictureURL = currentMember.pictureURL
}

} else if Store.shared.isLoggedIn {

name = Store.shared.session.name ?? ""
pictureURL = ""

} else {

name = ""
Expand Down